claude-code-nextjs-skills / references
AGENTS.md72 starsChanged 17 days agoMITView on GitHub
Build ToolLoopAgent and WorkflowAgent agents with AI SDK 7.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/ai-sdk-6/references/agents.mdAGENTS.md
- skills/openai-agents-sdk/references/agents.mdAGENTS.md
- skills/react-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-view-transitions/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-harness-reviewSkill
- ai-appSkill
- ai-elementsSkill
- ai-sdk-6Skill
- ai-sdk-7Skill
- ai-sdkSkill
- cache-componentsSkill
- chrome-devtoolsSkill
- frontend-designSkill
- goSkill
- handoffSkill
- hetzner-cloudSkill
- iconsSkill
- next-best-practicesSkill
- nextjs-chatbotSkill
- nextjs-seoSkill
- nextjs-shadcnSkill
- openai-agents-sdkSkill
- postgres-semantic-searchSkill
- react-best-practicesSkill
- shadcnSkill
- supabase-postgres-best-practicesSkill
- vercel-react-view-transitionsSkill
- web-design-guidelinesSkill
The file
We split this agents.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Read installed workflow types before adapting core agent helpers.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent execution contracts
Choose ToolLoopAgent for an in-memory request lifecycle, WorkflowAgent
from @ai-sdk/workflow for durable workflow-backed execution, and
HarnessAgent for a runtime such as Claude Code or Codex. Text functions
default to one step, ToolLoopAgent to 20; WorkflowAgent.stream() has no default
step-count limit. Set stopWhen for the task budget.
ToolLoopAgent accepts generation/streaming calls and infers UI message types
with InferAgentUIMessage. Request state belongs in per-call options or
prepareCall, not a mutable singleton shared across tenants.
runtimeContext is shared loop state; toolsContext is validated per-tool
state through contextSchema. Put information the model needs in instructions
or messages, not only context.
WorkflowAgent is stream-first; generate() works from @ai-sdk/workflow 2.0.59 /
ai 7.0.128 with a 20-step default and throws on older versions. Streaming writes
ModelCallStreamPart chunks to a workflow writable and converts them at the UI
boundary with createModelCallToUIChunkTransform(). Durable tool work uses
'use step'; context must be serializable. Its approval API remains tool-level
needsApproval, while ToolLoopAgent uses toolApproval. UI types come from
InferWorkflowAgentUIMessage. It replaces Workflow DevKit's DurableAgent.
@ai-sdk/workflow 2.0.66 onward peer-requires workflow ^5.1.0. Install
workflow@5; the workflow@beta tag points to an older, incompatible 5.0 beta. Signed approvals use
experimental_toolApprovalSecret: { environmentVariable } so raw keys are not
serialized into durable steps.
Read installed workflow types before adapting core agent helpers. Start from agent docs and WorkflowAgent docs; for runtime-owned history see harnesses.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

