Token导航 LogoToken导航

Agent Skill · 研究检索

directive-synthesis(定向综合)

directive-synthesis 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

directive-synthesis 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 37,495。

总安装 1,726周安装 66GitHub Stars 5下载 523核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:directive-synthesis(定向综合)
来源仓库:https://github.com/qodex-ai/ai-agent-skills
仓库路径:skills/directive-synthesis
安装命令:
npx skills add https://github.com/qodex-ai/ai-agent-skills --skill directive-synthesis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/qodex-ai/ai-agent-skills --skill directive-synthesis

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

directive-synthesis skill 引导用户创建 Claude Code 自定义指令,包含参数处理与工作流设计规范。适用于自动化重复任务、封装复杂操作或构建领域专用语言(DSL),提升 Agent 工作效率。使用前需定义清晰的 frontmatter 结构与 $ARG 占位符,并通过 !

`command` 语法嵌入 shell 指令。安装前请谨慎审查所有 shell 命令执行风险,建议在沙箱环境测试后再应用于生产项目,防止误删文件。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/directive-synthesis

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/qodex-ai/ai-agent-skills --skill directive-syn…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

directive-synthesis 怎么安装?

在终端执行 npx skills add https://github.com/qodex-ai/ai-agent-skills --skill directive-synthesis。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

directive-synthesis 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

directive-synthesis 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/qodex-ai/ai-agent-skills --skill directive-synthesis;npx skills add qodex-ai/ai-agent-skills --skill "directive-synthesis" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

directive-synthesis 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

directive-synthesis 用的人多吗?

公开数据是累计安装 1,726 次,近一周安装 66 次,下载 523 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

directive-synthesis 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
directive-synthesis

定向综合 · 本页

1,7265执行命令MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Claude Code Command Builder

Purpose

Guide users through creating effective Claude Code slash commands with proper structure, argument handling, and workflow design. Auto-invokes when users want to create or modify custom commands.

When to Use

Auto-invoke when users mention:

  • Creating commands - "create command", "make command", "new slash command"
  • Command structure - "command template", "command format", "command frontmatter"
  • Arguments - "$ARGUMENTS", "$1", "$2", "command parameters", "positional args"
  • Workflows - "command workflow", "command steps", "command process"
  • Bash execution - "!command", "execute bash in command", "command with bash"

Knowledge Base

  • Official docs: .claude/skills/ai/claude-code/docs/code_claude_com/docs_en_slash-commands.md
  • Project guide: .claude/docs/creating-components.md
  • Examples in repository: .claude/commands/

Process

1. Gather Requirements

Ask the user:

Let me help you create a Claude Code slash command! I need a few details:

1. **Command name** (lowercase-with-hyphens):
   Example: deploy, review-pr, commit, analyze-tokens
   This will be invoked as: /your-command-name

2. **What does this command do?**
   Describe the workflow in 1-2 sentences.

3. **Does it need arguments?**
   - None (simple prompt)
   - All arguments: $ARGUMENTS
   - Positional: $1, $2, $3, etc.

4. **Does it need bash execution?**
   Commands that run before the slash command (e.g., !`git status`)

5. **Scope:**
   - Personal (`~/.claude/commands/`) - just for you
   - Project (`.claude/commands/`) - shared with team

6. **Namespace/subdirectory?**
   Example: git/, deploy/, testing/
   Helps organize related commands

2. Validate Input

Check the command name:

  • Must be valid filename (no spaces, special chars except hyphen)
  • Descriptive and memorable
  • Won't conflict with built-in commands
  • Use hyphens (not underscores)

Validate arguments:

  • Define expected arguments
  • Provide defaults if needed
  • Document argument order

3. Determine Command Type

Simple Prompt (no frontmatter):

Analyze this code for performance issues and suggest optimizations.

With Arguments:

---
argument-hint: [file-path]
description: Analyze file for performance issues
---

Analyze the file at $1 for performance issues and suggest optimizations.

With Bash Execution:

---
allowed-tools: Bash(git status:*), Bash(git diff:*)
description: Create a git commit
---

## Current State

- Git status: !`git status`
- Staged changes: !`git diff --staged`
- Recent commits: !`git log --oneline -5`

## Your Task

Based on the above changes, create a git commit with a clear, conventional commit message.

Full-Featured:

---
allowed-tools: Bash(npm run:*), Bash(git add:*), Bash(git commit:*)
argument-hint: [component-name]
description: Create a new React component with tests
model: sonnet
---

# Create React Component

Component name: $1

Execute the following workflow:

1. **Validate Input**
   !`test -n "$1" && echo "Creating component: $1" || echo "Error: Component name required"`

2. **Check Existing Files**
   !`ls src/components/$1.tsx 2>/dev/null || echo "Component does not exist"`

3. **Create Files**
   Create the following files:
   - `src/components/$1.tsx`
   - `src/components/$1.test.tsx`
   - `src/components/$1.module.css`

4. **Run Tests**
   After creation, run: !`npm run test -- $1`

4. Generate Command File

Create command structure based on complexity:

Template for Simple Command:

Brief description of what the command does.

[Prompt instructions for Claude]

Template for Command with Frontmatter:

---
argument-hint: [arg1] [arg2]
description: Brief description shown in /help
allowed-tools: Bash(command:*), Read, Write
model: sonnet
disable-model-invocation: false
---

# Command Name

Usage: /command-name [args]

[Detailed instructions]

5. Build Command Workflow

Structure the workflow with clear steps:

Execute the following workflow:

1. **Step Name**

# Bash command (if needed) command arg1 arg2


- What this step does
- Validation checks
- Error handling

1. **Next Step** [Instructions for Claude]
  - What to check
  - How to proceed
  - What to output
2. **Final Step**
  - Summary of results
  - Next actions for user
  - Success criteria

6. Add Argument Handling

All Arguments ($ARGUMENTS):

Fix issue #$ARGUMENTS following our coding standards.

User runs: /fix-issue 123 high-priority Becomes: "Fix issue #123 high-priority following our coding standards."

Positional Arguments ($1, $2, $3):

Review PR #$1 with priority $2 and assign to $3.
Focus on: $4

User runs: /review-pr 456 high alice security Becomes individual parameters you can reference separately.

With Defaults:

---
argument-hint: [environment] [branch]
---

Deploy to environment: ${1:-staging}
From branch: ${2:-main}

7. Add Bash Execution (if needed)

Use ! prefix to execute commands before processing:

---
allowed-tools: Bash(git:*)
---

## Context

- Current branch: !`git branch --show-current`
- Status: !`git status --short`
- Recent commits: !`git log --oneline -5`

## Your Task

[Instructions based on the above context]

Important:

  • Must specify allowed-tools with specific Bash permissions
  • Output is included in command context
  • Commands run before Claude processes the prompt

8. Add File References

Use @ prefix to reference files:

Review the implementation in @src/utils/helpers.js

Compare @src/old-version.js with @src/new-version.js

Analyze all files in @src/components/

9. Configure Thinking Mode (if needed)

For complex problems, trigger extended thinking:

Carefully analyze the following code and think through...

Let's approach this step by step...

Consider all edge cases before implementing...

These keywords can trigger extended thinking mode.

10. Create the File

Save to correct location:

Personal command:

~/.claude/commands/command-name.md
~/.claude/commands/category/command-name.md  # With namespace

Project command:

.claude/commands/command-name.md
.claude/commands/category/command-name.md  # With namespace

11. Test the Command

Provide testing instructions:

To test your command:
1. Restart Claude Code or start a new session
2. Type: /help
3. Find your command in the list
4. Try: /your-command-name [args]
5. Verify it behaves as expected

Test cases:

# No arguments
/your-command

# With arguments
/your-command arg1
/your-command arg1 arg2

# Edge cases
/your-command ""
/your-command "with spaces"

Frontmatter Reference

FieldPurposeExample
argument-hintShow expected arguments in autocomplete[pr-number] [priority]
descriptionBrief description for /help menuReview pull request
allowed-toolsTools command can useBash(git:*), Read, Write
modelSpecific model to useclaude-sonnet-4-5-20250929
disable-model-invocationPrevent SlashCommand tool from calling thistrue

Bash Tool Permissions

When using ! prefix or needing bash execution:

---
allowed-tools: Bash(git add:*), Bash(git commit:*), Bash(git push:*)
---

Permission patterns:

  • Bash(git:*) - All git commands
  • Bash(npm run:*) - All npm run scripts
  • Bash(git add:*), Bash(git commit:*) - Specific git commands

Argument Patterns

Pattern 1: All Arguments

Run tests for: $ARGUMENTS

Usage: /test users api database Becomes: "Run tests for: users api database"

Pattern 2: Positional

Deploy $1 to $2 environment with tag $3

Usage: /deploy my-app staging v1.2.3 Becomes: "Deploy my-app to staging environment with tag v1.2.3"

Pattern 3: Mixed

---
argument-hint: <file> [rest of args]
---

Analyze file $1 for: $ARGUMENTS

Usage: /analyze src/app.js performance security Becomes: "Analyze file src/app.js for: src/app.js performance security" Note: $ARGUMENTS includes all args, so $1 is duplicated

Better approach:

Analyze file $1 for: ${2:+${@:2}}

This uses $1 separately and remaining args starting from $2

Pattern 4: With Defaults

Environment: ${1:-production}
Verbose: ${2:-false}

Command Size Guidelines

  • ✅ Good: < 100 lines
  • ⚠️ Warning: 100-150 lines
  • ❌ Too large: > 250 lines (must refactor)

If too large:

  • Extract to external script
  • Split into multiple commands
  • Use sub-commands pattern

Common Command Types

1. Git Workflow

---
allowed-tools: Bash(git:*)
description: Create conventional commit
---

## Context
- Status: !`git status --short`
- Diff: !`git diff HEAD`

Create a conventional commit message.

2. Code Generator

---
argument-hint: [component-name]
description: Generate React component
---

Create a new React component named $1:
- Component file
- Test file
- Storybook story

3. Analysis Tool

---
argument-hint: [file-path]
description: Analyze code complexity
---

Analyze @$1 for:
- Cyclomatic complexity
- Code smells
- Improvement suggestions

4. Deployment Helper

---
allowed-tools: Bash(npm:*), Bash(git:*)
argument-hint: [environment]
description: Deploy to environment
---

Deploy to ${1:-staging}:
1. Run tests: !`npm test`
2. Build: !`npm run build`
3. Deploy: !`npm run deploy:$1`

5. Documentation Generator

---
argument-hint: [file-pattern]
description: Generate API documentation
---

Generate documentation for: $1
Include:
- Function signatures
- Parameters
- Return types
- Examples

Examples from TOON Formatter

Simple version:

# Convert to TOON

Convert the specified JSON file to TOON v2.0 format with automatic optimization and show token savings.

Usage: /convert-to-toon <file>

Advanced version with bash:

---
allowed-tools: Bash(jq:*), Bash(.claude/utils/toon/zig-out/bin/toon:*)
argument-hint: <file> [--delimiter comma|tab|pipe]
description: Convert JSON to TOON format
---

# Convert to TOON

File: $1
Delimiter: ${2:-comma}

1. **Validate**: !`test -f "$1" && jq empty "$1" 2>&1`
2. **Analyze**: !`jq 'if type == "array" then length else 0 end' "$1"`
3. **Convert**: !`.claude/utils/toon/zig-out/bin/toon encode "$1"`
4. Show savings comparison

Troubleshooting

Command Not Found

Check:

# List all commands
ls ~/.claude/commands/*.md
ls .claude/commands/*.md

# Verify filename
ls .claude/commands/your-command.md

Remember:

  • Filename (without .md) becomes command name
  • Hyphens in filename become hyphens in command
  • Case-sensitive on Linux/Mac

Arguments Not Working

Debug:

Debug: $ARGUMENTS
Debug $1: "$1"
Debug $2: "$2"

Run command and check output to see what's being passed.

Bash Commands Not Executing

Check:

  1. allowed-tools includes correct Bash permissions
  2. Using ! prefix: !command``
  3. Backticks are correct: command not 'command'
  4. Command is allowed by permissions

Command Not in /help

Possible reasons:

  • File not in correct location
  • File doesn't have .md extension
  • Syntax error in frontmatter
  • Need to restart Claude Code

Best Practices

DO:

✅ Provide clear argument hints ✅ Include usage examples ✅ Handle errors gracefully ✅ Show progress for long operations ✅ Document expected behavior ✅ Test with various inputs ✅ Use descriptive command names

DON'T:

❌ Make commands too complex (>250 lines) ❌ Forget to specify allowed-tools for Bash ❌ Use unclear argument names ❌ Skip error handling ❌ Hardcode values (use arguments) ❌ Forget to test edge cases

Comparison: Commands vs Skills

Use Commands when:

  • You want explicit control (manual invocation)
  • Simple, repetitive prompts
  • Specific workflow steps
  • Frequently-used templates

Use Skills when:

  • Claude should auto-detect need
  • Complex, multi-file workflows
  • Comprehensive domain knowledge
  • Team needs standardized expertise

Can use both:

  • Command invokes skill explicitly
  • Skill activates automatically
  • Command provides quick access
  • Skill provides deep capability

Resources

  • Official Command Docs: .claude/skills/ai/claude-code/docs/code_claude_com/docs_en_slash-commands.md
  • Project Component Guide: .claude/docs/creating-components.md
  • Command Examples: .claude/commands/ directory
  • Skills vs Commands: Section in slash-commands.md

平台分布

Claude Code

27.64%
按下载量换算145

trae

23.71%
按下载量换算124

Codex

18.44%
按下载量换算96

Antigravity

14.15%
按下载量换算74

windsurf

8.39%
按下载量换算44

github-copilot

3.86%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/qodex-ai/ai-agent-skills --skill directive-synthesis;npx skills add qodex-ai/ai-agent-skills --skill "directive-synthesis" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills