Build agent
Skill nanocodana/nanocodana/packages/cli/example-skills/build-agent
Scaffold, write, and test a brand-new NanoCodana agent (a runnable NodeAgent script, plus a skill if useful) from a plain-language descriptionFrom its SKILL.md
npx -y skills add nanocodana/nanocodana --skill build-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, 675 tokens by cl100k_base, as published. Nobody here has run it
Build Agent Skill
Turn a description like "an agent that writes commit messages" into a working,
tested NanoCodana agent. NanoCodana is a coding-agent framework on the Vercel AI
SDK: an agent is created with NodeAgent({ ... }) and run with
agent.generate({ prompt }) or agent.stream({ messages }).
Template — a minimal runnable agent
Write a file like this to the current working directory (adapt the name, model, system prompt, and tools to the request). It reads the API key from the environment — no dotenv needed, because it inherits the parent process's env.
import { NodeAgent } from '@nanocodana/nodejs'
import { createAnthropic } from '@ai-sdk/anthropic'
const model = createAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY })(
'claude-sonnet-4-5',
)
const agent = NodeAgent({
model,
workingDirectory: process.cwd(),
systemPrompt: `<one paragraph describing this agent's single job>`,
// Optional: gate or restrict tools for safety, e.g.
// needsApproval: ['Write', 'Edit', 'Delete'],
})
// The task comes in as the first CLI arg (fallback for a quick smoke test).
const task = process.argv[2] ?? '<a representative default task>'
const result = await agent.generate({ prompt: task })
console.log(result.text)
If OPENAI_API_KEY is set instead of ANTHROPIC_API_KEY, use
createOpenAI(...)('gpt-4o') from @ai-sdk/openai.
Steps
- Clarify the agent's single purpose, its model, and which tools it needs. Keep the scope to one clear job.
- Write the agent script to
<name>.mjsin the current working directory. - (Optional) Write a skill at
.agents/skills/<name>/SKILL.mdif the agent needs reusable, loadable instructions — then have the generated agent load it (omitskillsto let it auto-discover from its working dir). - Test it by running it with the host shell and a representative task:
(Use Bash withnode <name>.mjs "a representative task for this agent"host: true— running Node needs the real shell.) - Read the output. If the agent misbehaves, fix the script or its system prompt / skill and run it again. Don't stop until it produces a sensible result.
- Summarize what you built: the file(s) created, the agent's purpose, and the exact command to run it.
Rules
- Keep generated agents minimal — only
@nanocodana/nodejsplus one AI SDK provider. No extra dependencies. - Default to safe tools. Do not enable host Bash or destructive tools in a generated agent unless the user explicitly asks.
- Always test before declaring done.
- Do NOT build an agent whose job is to build other agents (no recursion).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most context ai engineering skills give in 675 tokens
Counted across 1,193 of the 1,976 authors here whose files we hold, read 2026-08-07
- Dispatch a fresh implementer subagent per taskin 48 of 1193, across 19 files
- Dispatch a final code reviewer after all tasksin 33 of 1193, across 8 files
- Provide full task text to the subagentin 30 of 1193, across 9 files
- Review spec compliance before code qualityin 27 of 1193, across 10 files
- Make the hook script executablein 26 of 1193, across 8 files
- Re-snapshot after navigation or DOM changesin 25 of 1193, across 19 files
- Read files before editing themin 22 of 1193, across 11 files
- Answer subagent questions before proceedingin 22 of 1193, across 7 files
- Mark task complete in TodoWrite after approvalin 22 of 1193, across 6 files
- Merge hook into existing settingsin 21 of 1193, across 3 files
- Ask if installation is global or projectin 20 of 1193, across 2 files
- Copy the hook script to target locationin 20 of 1193, across 2 files
Said here and by no other author read
- clarify the agent single purpose model and tools
- write the agent script to a mjs file
- write a skill file if reusable instructions are needed
- test the agent using a representative task
- run node scripts using host bash
- fix the script if the agent misbehaves
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.