重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
moai-foundation-claude by modu-ai/moai-adk
npx skills add https://github.com/modu-ai/moai-adk --skill moai-foundation-claudeClaude 代码技能、子代理、插件、斜杠命令、钩子、记忆、设置、沙箱化、无头模式及高级代理模式的综合参考。
核心功能:
配置:
高级功能:
技能:模型调用的扩展,位于 ~/.claude/skills/(个人)或 .claude/skills/(项目)。三级渐进式披露。最多 500 行。
子代理:通过 Agent(subagent_type="...") 调用的专业助手。拥有独立的 200K 上下文。不能生成其他子代理。使用 /agents 命令。
插件:可复用的捆绑包,位于 .claude-plugin/plugin.json。包含命令、代理、技能、钩子、MCP 服务器。
命令:用户通过 /command 调用。参数:$ARGUMENTS, $1, $2。文件引用:@file。
钩子:settings.json 中的事件。PreToolUse, PostToolUse, SessionStart, SessionEnd, PreCompact, Notification。
记忆:CLAUDE.md 文件 + .claude/rules/*.md。企业级到项目级到用户级的层级结构。@import 语法。
设置:6 级层级结构。托管到文件托管到 CLI 到本地到共享到用户。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
沙箱化:操作系统级隔离。文件系统和网络限制。自动允许安全操作。
无头模式:-p 标志用于非交互模式。--allowedTools, --json-schema, --agents 用于自动化。
第 1 级(元数据):启动时加载的名称和描述,每个技能约 100 个令牌
第 2 级(指令):触发时加载的 SKILL.md 正文,建议少于 5K 令牌
第 3 级(资源):按需加载的附加文件,实际上无限制
创建一个 SKILL.md 文件,包含 YAML 前置元数据,其中包含 kebab-case 格式的名称和描述(用第三人称解释其功能和何时使用)。描述最多 1024 个字符。在前置元数据之后,包含一个带有技能名称的标题、一个带有简要说明的“快速开始”部分以及一个引用 REFERENCE.md 获取更多信息的“详细信息”部分。
输入 /agents,选择“创建新代理”,定义目的和工具,按 e 编辑提示。
创建一个 Markdown 文件,包含 YAML 前置元数据,其中包含名称、描述(解释何时调用,使用 PROACTIVELY 表示自动委派)、工具作为逗号分隔的列表(Read, Write, Bash)以及模型规格(sonnet)。在前置元数据之后,包含系统提示。
创建 my-plugin 目录,包含 .claude-plugin/plugin.json、commands 目录、agents 目录、skills 目录、hooks/hooks.json 和 .mcp.json 文件。
创建一个 JSON 对象,包含名称、描述(解释插件目的)、版本(如 1.0.0)和作者对象(包含 name 字段)。
使用 /plugin install owner/repo 从 GitHub 安装。使用 /plugin validate . 验证当前目录。使用 /plugin enable plugin-name 启用插件。
初始化代理:设置环境、功能注册表、进度文档
执行代理:处理单个功能、更新注册表、维护进度
详情请参阅 reference/advanced-agent-patterns.md。
主导代理:分解任务、生成工作者、综合结果
工作者代理:执行聚焦任务、返回精简摘要
当使用 Explore 代理或直接探索工具(Grep, Glob, Read)时,应用以下优化以防止 GLM 模型出现性能瓶颈:
AST-Grep 优先
sg -p 'class $X extends Service' --lang python 比 grep -r "class.*extends.*Service" 更快搜索范围限制
path 参数限制搜索范围Grep(pattern="func ", path="internal/core/") 而非 Grep(pattern="async def")文件模式特异性
Glob(pattern="internal/core/*.go") 而非 Glob(pattern="src/**/*.py")并行处理
阶段 1 探索:读取文件、理解结构、映射依赖关系
阶段 2 规划:使用 think 提示、概述方法、定义标准
阶段 3 编码:迭代实现、验证每个步骤、处理边界情况
阶段 4 提交:描述性消息、逻辑分组、清晰历史
有关详细模式和实际示例,请参阅 reference 目录。
版本历史:
每周安装次数
64
代码仓库
GitHub 星标数
888
首次出现
2026 年 1 月 22 日
安全审计
安装于
opencode56
claude-code55
gemini-cli53
codex52
cursor50
antigravity46
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="..."). Own 200K context. Cannot spawn sub-agents. Use /agents command.
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.
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.
Create 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
sg -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:
Weekly Installs
64
Repository
GitHub Stars
888
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode56
claude-code55
gemini-cli53
codex52
cursor50
antigravity46
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
53,700 周安装
GraphQL架构师指南:Apollo联邦、模式设计与性能优化最佳实践
1,000 周安装
Feature Forge:AI驱动的功能规格定义工具,结构化需求工作坊
1,100 周安装
agent-eval:编程智能体评估工具,自动化测试比较AI代码助手性能
1,100 周安装
抖音无水印视频下载器 - 支持文案提取和语音识别,一键保存视频和文字内容
1,100 周安装
Ghost Security Secrets Scanner - 机密信息扫描编排器,自动化检测代码中的敏感数据
1,100 周安装
Salesforce CRM 集成指南:使用 Membrane CLI 连接与自动化操作
1,100 周安装