Claude Code Agent Development
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
Canonical Claude Code authoring kit covering Skills, sub-agents, plugins, slash commands, hooks, memory, settings, sandboxing, headless mode, and advanced agent patterns.
$ npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install modu-ai/moai-adk moai-foundation-cc --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/moai-foundation-cc .claude/skills/moai-foundation-cc && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "moai-foundation-cc" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-cc into .claude/skills/moai-foundation-cc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-foundation-cc", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-ccType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install modu-ai/moai-adk moai-foundation-cc --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/moai-foundation-cc .agents/skills/moai-foundation-cc && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "moai-foundation-cc" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-cc into .agents/skills/moai-foundation-cc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-foundation-cc", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install modu-ai/moai-adk moai-foundation-cc --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/moai-foundation-cc .cursor/skills/moai-foundation-cc && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "moai-foundation-cc" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-cc into .cursor/skills/moai-foundation-cc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-foundation-cc", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/modu-ai/moai-adk.git --path .claude/skills/moai-foundation-cc--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install modu-ai/moai-adk moai-foundation-cc --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/moai-foundation-cc .gemini/skills/moai-foundation-cc && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "moai-foundation-cc" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-cc into .gemini/skills/moai-foundation-cc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-foundation-cc", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install modu-ai/moai-adk moai-foundation-ccInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/moai-foundation-cc .github/skills/moai-foundation-cc && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "moai-foundation-cc" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-cc into .github/skills/moai-foundation-cc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-foundation-cc", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install modu-ai/moai-adk moai-foundation-cc --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/modu-ai/moai-adk.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/moai-foundation-cc .opencode/skills/moai-foundation-cc && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "moai-foundation-cc" agent skill from https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-foundation-cc into .opencode/skills/moai-foundation-cc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "moai-foundation-cc", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
moai-foundation-ccCanonical Claude Code authoring kit covering Skills, sub-agents, plugins, slash commands, hooks, memory, settings, sandboxing, headless mode, and advanced agent patterns.
Moai Foundation Cc is an agent skill from modu-ai/moai-adk. Canonical Claude Code authoring kit covering Skills, sub-agents, plugins, slash commands, hooks, memory, settings, sandboxing, headless mode, and advanced agent patterns. Use when creating Claude Code extensions or configuring Claude Code features.
Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 27 other files (for example `reference/advanced-agent-patterns.md`, `reference/best-practices-checklist.md` and `reference/claude-code-cli-reference-official.md`). Compatibility notes: Designed for Claude Code
It sits in Agent Workflows, covering Subagents and Hooks and plugins. The repository describes itself as: Agentic development harness for Claude Code — SPEC-driven plan/run/sync, TRUST 5 quality gates, model+effort routing, and Claude×GLM multi-LLM cost control. Single Go binary, 16… The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 2aab5f7. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGrepGlobFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code
From compatibility in the SKILL.md frontmatter.
Moai Foundation Cc loads about 3.3k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 1,430 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from modu-ai/moai-adk at commit 2aab5f7, republished under its Apache-2.0 licence (© modu-ai). 1,430 words, ~3,286 tokens.
.claude/skills/moai-foundation-cc/SKILL.md (or your agent's skills folder). This skill also uses 26 other files; get the full folder from GitHub.Comprehensive reference for Claude Code Skills, sub-agents, plugins, slash commands, hooks, memory, settings, sandboxing, headless mode, and advanced agent patterns.
Core Features:
Configuration:
Advanced Features:
Skills: Model-invoked extensions in ~/.claude/skills/ (personal) or .claude/skills/ (project). Three-level progressive disclosure. Max 500 lines.
Sub-agents: Specialized assistants via Agent(subagent_type="..."). Context window follows the session model (Sonnet 5 = 1M native on the Anthropic API; Haiku / gateway / older models = 200K — CC 2.1.197). Nesting: by default a subagent CAN spawn subagents of its own, up to three layers below the main conversation; CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH changes the limit and 1 turns nesting off (CC 2.1.217+). At the depth limit Claude Code withholds the Agent tool. To stop one specific subagent from spawning, omit Agent from its tools list or add it to disallowedTools — MoAI retained agents omit Agent with one deliberate carve-out — manager-lead carries it as the sole depth-1 fan-out seam, and every leaf worker it spawns MUST omit Agent (the depth-2 seal, enforced at lint time; sentinel DEPTH_SEAL_VIOLATION) — so nothing re-delegates below that one layer, regardless of the depth setting. To create or manage subagents, ask Claude or edit .claude/agents/ directly — the /agents wizard was removed in CC 2.1.198 (the official sub-agents doc still documented a /agents tabbed interface as of 2026-07-03; doc lag — verify in a live 2.1.198 session).
Plugins: Reusable bundles in .claude-plugin/plugin.json. Include commands, agents, skills, hooks, MCP servers.
Commands: User-invoked via /command. Parameters: $ARGUMENTS, $1, $2. File refs: @file.
Hooks: Events in settings.json. PreToolUse, PostToolUse, SessionStart, SessionEnd, PreCompact, Notification.
Memory: CLAUDE.md files + .claude/rules/*.md. Enterprise to Project to User hierarchy. @import syntax.
Settings: 6-level hierarchy. Managed to file-managed to CLI to local to shared to user.
Sandboxing: OS-level isolation. Filesystem and network restrictions. Auto-allow safe operations.
Headless: -p flag for non-interactive. --allowedTools, --json-schema, --agents for automation.
Level 1 (Metadata): Name and description loaded at startup, approximately 100 tokens per Skill
Level 2 (Instructions): SKILL.md body loaded when triggered, under 5K tokens recommended
Level 3 (Resources): Additional files loaded on demand, effectively unlimited
Create a SKILL.md file with YAML frontmatter containing name in kebab-case and description explaining what it does and when to use it in third person. Maximum 1024 characters for description. After the frontmatter, include a heading with the skill name, a Quick Start section with brief instructions, and a Details section referencing REFERENCE.md for more information.
CC 2.1.198 CHANGELOG delta: The
/agentswizard was removed — per the CHANGELOG, "ask Claude to create or manage subagents, or edit.claude/agents/directly." The official sub-agents doc still documented a/agentstabbed interface as of 2026-07-03 (doc lag, or the removal covers only the creation wizard); verify in a live 2.1.198 session before relying on the flow below.
Type /agents, select Create New Agent, define purpose and tools, press e to edit prompt.
Create a markdown file with YAML frontmatter containing name, description explaining when to invoke (use PROACTIVELY for auto-delegation), tools as comma-separated list (Read, Write, Bash), and model specification (sonnet). After frontmatter, include the system prompt.
Agent from tools, so they do not spawn subagents of their ownCreate my-plugin directory with .claude-plugin/plugin.json, commands directory, agents directory, skills directory, hooks/hooks.json, and .mcp.json file.
Create a JSON object with name, description explaining plugin purpose, version as 1.0.0, and author object containing name field.
Use /plugin install owner/repo to install from GitHub. Use /plugin validate . to validate current directory. Use /plugin enable plugin-name to enable a plugin.
Initializer agent: Sets up environment, feature registry, progress docs
Executor agent: Works single features, updates registry, maintains progress
See reference/advanced-agent-patterns.md for details.
Lead agent: Decomposes tasks, spawns workers, synthesizes results
Worker agents: Execute focused tasks, return condensed summaries
When using Explore agent or direct exploration tools (Grep, Glob, Read), apply these optimizations to prevent performance bottlenecks with GLM models:
AST-Grep Priority
moai ast-grep to scan, moai ast-edit to rewrite matchessg -p 'class $X extends Service' --lang python is faster than grep -r "class.*extends.*Service"Search Scope Limitation
path parameter to limit search scopeGrep(pattern="func ", path="internal/core/") instead of Grep(pattern="async def")File Pattern Specificity
Glob(pattern="internal/core/*.go") instead of Glob(pattern="src/**/*.py")Parallel Processing
Phase 1 Explore: Read files, understand structure, map dependencies
Phase 2 Plan: Use think prompts, outline approach, define criteria
Phase 3 Code: Implement iteratively, verify each step, handle edges
Phase 4 Commit: Descriptive messages, logical groupings, clean history
For detailed patterns and working examples, see the reference directory.
Version History:
<!-- moai:evolvable-start id="rationalizations" -->
| Rationalization | Reality |
|---|---|
| "I will use Bash sed instead of Edit, it is faster" | Edit is the preferred tool for accuracy and review. Bash sed errors are silent and hard to trace. |
| "This hook does not need a timeout, it finishes quickly" | Hooks without timeouts can hang the entire session. Always set an explicit timeout. |
| "I can put all logic in CLAUDE.md, rules are overkill" | CLAUDE.md has a 40K character limit. Rules load conditionally and scale without bloating the prompt. |
| "Settings.json changes are low risk" | Incorrect settings.json breaks hooks, permissions, and model routing. Validate the JSON after every edit. |
| "I will skip progressive disclosure, all content is needed" | Loading 5K tokens for every skill wastes 67% of context. Level 1 metadata is sufficient for routing. |
| "allowed-tools restricts which tools the skill may use" | It does the opposite: allowed-tools pre-approves those tools for the turn that invokes the skill, so they run without a permission prompt. The field that removes tools is disallowed-tools. Omitting allowed-tools is not a leak — the standard permission model still applies. |
<!-- moai:evolvable-end -->
<!-- moai:evolvable-start id="red-flags" -->
<!-- moai:evolvable-end -->
<!-- moai:evolvable-start id="verification" -->
<!-- moai:evolvable-end -->
© modu-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 26 other files in .claude/skills/moai-foundation-cc of modu-ai/moai-adk.
Open the folder on GitHubat commit 2aab5f7
Moai Foundation Cc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Moai Foundation Cc this skillmodu-ai/moai-adk | 1.2k | — | ~3.3k | Automated safety check: Pass | Apache-2.0 | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 38k | 7 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Claude Automation Recommenderanthropics/claude-plugins-official | 38k | 3 repos | ~2.7k | Automated safety check: Notes | Apache-2.0 | |
| Weaveentropyvortex/meta-llm-charter | 249 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Claude Code Advanced Guide2025Emma/vibe-coding-cn | 23k | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Claude Code Mastery Squadohmyjahh/xquads-squads | 277 | — | ~1.1k | Automated safety check: Pass | MIT |
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
anthropics/claude-plugins-official
Scans a codebase and suggests which Claude Code hooks, subagents, skills, plugins and MCP servers fit its stack, without changing any files.
entropyvortex/meta-llm-charter
Parallel strand orchestration — decompose a task into 3+ independently scoped strands, fan out real subagents (worktree-isolated when they write files), and coordinate through a session file and…
2025Emma/vibe-coding-cn
A Chinese-language tutorial on advanced Claude Code use: its core tools, REPL, slash commands, workflows, permissions, memory, MCP, hooks and sub-agents.
ohmyjahh/xquads-squads
Routes a request to one of eight specialist agents covering hooks, skills, subagents, MCP integration and context engineering for Claude Code.
nicepkg/ai-workflow
Transform legacy codebases into AI-ready projects with Claude Code configurations.
modu-ai/moai-adk
Builds hand-editable SVG diagrams from computed layout coordinates, lints the source and renders a 2x PNG, with rules for when mermaid is the better choice.
modu-ai/moai-adk
Reference for MoAI-ADK's core development principles: TRUST 5 quality gates, SPEC-first domain-driven workflow, agent delegation and token budgeting.
modu-ai/moai-adk
Manages SPEC documents for MoAI-ADK development, with GEARS or EARS requirement notation, acceptance criteria and a link into the Plan-Run-Sync workflow.
modu-ai/moai-adk
Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.
modu-ai/moai-adk
Gives each SPEC its own Git worktree with a registry of active workspaces, base-branch sync and cleanup of merged ones, inside the MoAI-ADK workflow.
modu-ai/moai-adk
Watches a pull request's CI checks after creation, separates required from auxiliary failures, applies limited safe fixes and escalates anything semantic to you.
Categories
Canonical Claude Code authoring kit covering Skills, sub-agents, plugins, slash commands, hooks, memory, settings, sandboxing, headless mode, and advanced agent patterns. Moai Foundation Cc is an agent skill from modu-ai/moai-adk. Canonical Claude Code authoring kit covering Skills, sub-agents, plugins, slash commands, hooks, memory, settings, sandboxing, headless mode, and advanced agent patterns.
Moai Foundation Cc fits situations like: creating Claude Code extensions; configuring Claude Code features.
Run `npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a claude-code`. Or copy the skill folder (.claude/skills/moai-foundation-cc in modu-ai/moai-adk) into .claude/skills/moai-foundation-cc in your project. Claude Code loads it when a task matches its description.
Run `npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a codex`. Or copy the skill folder (.claude/skills/moai-foundation-cc in modu-ai/moai-adk) into .agents/skills/moai-foundation-cc in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add modu-ai/moai-adk --skill moai-foundation-cc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/moai-foundation-cc, .gemini/skills/moai-foundation-cc, .github/skills/moai-foundation-cc and .opencode/skills/moai-foundation-cc in your project.
SKILL.md names no scripts, command-line tools or credentials: Moai Foundation Cc is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob. Compatibility (from SKILL.md): Designed for Claude Code.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Moai Foundation Cc is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Moai Foundation Cc: Claude Code Agent Development (anthropics/claude-plugins-official, 38k stars), Claude Automation Recommender (anthropics/claude-plugins-official, 38k stars), Weave (entropyvortex/meta-llm-charter, 249 stars) and Claude Code Advanced Guide (2025Emma/vibe-coding-cn, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
modu-ai (a GitHub organization) maintains it in modu-ai/moai-adk, which has 1,230 GitHub stars. The repository holds 48 skills in this directory. The repository was last updated on October 9, 2026.
Source: modu-ai/moai-adk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.