测试助手
- 作者仓库星标 483
- 作者更新于 实时读取
- 作者仓库 anytype-swift
- 领域
- 文档
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @anyproto · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skills-manager
description: Context-aware routing to skills and hooks management. Use when troubleshooting skill activation…
category: 文档
runtime: 无特殊运行时
---
# skills-manager 输出预览
## PART A: 任务判断
- 适用问题:PRD、RFC、README、项目说明或知识库整理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Purpose / When Auto-Activated / 🚨 CRITICAL RULES”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于PRD、RFC、README、项目说明或知识库整理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Purpose / When Auto-Activated / 🚨 CRITICAL RULES”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Purpose / When Auto-Activated / 🚨 CRITICAL RULES”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skills-manager
description: Context-aware routing to skills and hooks management. Use when troubleshooting skill activation…
category: 文档
source: anyproto/anytype-swift
---
# skills-manager
## 什么时候使用
- 把项目文档方向的常用动作沉淀成 Agent 可调用的技能 适合处理README、PRD、RFC、教程和知识库文档,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的…
- 面向PRD、RFC、README、项目说明或知识库整理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Purpose / When Auto-Activated / 🚨 CRITICAL RULES」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skills-manager" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Purpose / When Auto-Activated / 🚨 CRITICAL RULES
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Skills Manager (Smart Router)
Purpose
Context-aware routing to skills and hooks management. Helps you troubleshoot, fine-tune, and manage the automated documentation system.
When Auto-Activated
- Discussing skills activation or hooks
- Creating new skills
- Keywords: skill activation, hook, troubleshoot, fine-tune, keyword, skill-rules.json, create skill, new skill, agentskills
- Debugging why a skill didn't activate or activated incorrectly
🚨 CRITICAL RULES
- Logs are your friend - Always check
.claude/logs/skill-activations.logfirst - Test after changes - Always verify modifications to
skill-rules.jsonwork - Validate JSON - Use
jqto validate skill-rules.json before committing - Keywords should be specific - Too-broad keywords cause false positives
📋 Quick Diagnostic Workflow
Problem: Skill Didn't Activate
Check logs:
tail -20 .claude/logs/skill-activations.logCheck current keywords:
cat .claude/hooks/skill-rules.json | jq '.skills."SKILL-NAME".promptTriggers.keywords'Add missing keyword:
- Ask Claude: "Add 'KEYWORD' to SKILL-NAME"
- Or edit
.claude/hooks/skill-rules.jsondirectly
Test:
echo '{"prompt":"test prompt"}' | .claude/hooks/skill-activation-prompt.sh
Problem: Skill Activated When Shouldn't
Identify the trigger - Check logs to see which keyword matched
Remove or make more specific:
- Remove: "Remove 'text' from localization-developer"
- Make specific: Replace "text" with "localized text"
Verify:
tail .claude/logs/skill-activations.log
🎯 Common Tasks
Add a Keyword
Quick: Ask Claude
"Add 'refactoring' to ios-dev-guidelines keywords"
Manual: Edit .claude/hooks/skill-rules.json
"keywords": [
"swift",
"refactoring" // ← Add here
]
Remove a Keyword
Quick: Ask Claude
"Remove 'text' from localization-developer, it's too broad"
Manual: Edit and remove from keywords array
Check What Activated
tail -20 .claude/logs/skill-activations.log
Look for:
✓ Matched: skill-name # ← This skill activated
No matches found # ← Nothing activated
Test Activation Manually
echo '{"prompt":"add feature flag"}' | .claude/hooks/skill-activation-prompt.sh
Should output skill suggestion if match found.
Auto-Learning Feature
What it does: When a substantial prompt (100+ chars OR 3+ lines) doesn't activate any skills, the system prompts you with available skills and auto-updates keywords based on your feedback.
Workflow:
- You submit a substantial prompt
- No skills activate
- System shows: "Should any of these skills be activated?"
- You respond: "Yes, localization-developer should activate"
- Claude extracts keywords from your prompt
- Claude runs:
.claude/hooks/utils/add-keywords-to-skill.sh localization-developer <keywords> - skill-rules.json updated
- Future similar prompts auto-activate
Manual keyword extraction:
# Test keyword extraction
echo "Update space settings localization for membership tiers" | .claude/hooks/utils/extract-keywords.sh
# Output: membership, settings, localization, tiers, update
# Add keywords manually
.claude/hooks/utils/add-keywords-to-skill.sh localization-developer "membership" "tiers"
Logs:
- Missed activations:
.claude/logs/skill-activations-missed.log - Learning updates:
.claude/logs/skill-learning.log
🔧 The System Components
Hooks (Automation)
Location: .claude/hooks/
What they do:
skill-activation-prompt.sh- Suggests skills based on your promptpost-tool-use-tracker.sh- Tracks file editsswiftformat-post-edit.sh- Auto-formats Swift files immediately after editnotification-alert.sh- Sends macOS notifications when Claude needs input
Skills (Routers)
Location: .claude/skills/*/SKILL.md
The 7 skills:
ios-dev-guidelines- Swift/iOS patternslocalization-developer- Localizationcode-generation-developer- Feature flags, make generatedesign-system-developer- Icons, typography, colorsskills-manager- This skill (meta!)code-review-developer- Code review standardsfeature-toggle-developer- Feature toggle removal, cleanup detection
Configuration
Location: .claude/hooks/skill-rules.json
What it contains:
- Keywords for each skill
- Intent patterns (regex)
- File path patterns
- Priority settings
📊 Configuration Structure
{
"skills": {
"skill-name": {
"type": "domain",
"priority": "high", // or "medium", "low"
"description": "Smart router to...",
"promptTriggers": {
"keywords": ["keyword1", "keyword2"],
"intentPatterns": ["(create|add).*?something"]
},
"fileTriggers": {
"pathPatterns": ["**/*.swift"],
"contentPatterns": ["SomePattern"]
}
}
},
"config": {
"maxSkillsPerPrompt": 2,
"logActivations": true
}
}
📝 Creating New Skills (agentskills.io Spec)
Skills must follow the agentskills.io specification.
Required SKILL.md Format
Every skill must start with YAML frontmatter:
---
name: skill-name
description: What this skill does and when to use it (max 1024 chars).
---
# Skill Title
## Purpose
...
Name Field Rules
- 1-64 characters
- Lowercase only:
a-z,0-9,- - No start/end hyphens:
skill-name✅,-skill-❌ - No consecutive hyphens:
my-skill✅,my--skill❌ - Must match directory name:
skills/my-skill/SKILL.md→name: my-skill
Description Field
- 1-1024 characters
- Must describe: What it does AND when to use it
- Include keywords that help agents identify relevant tasks
Good example:
description: Context-aware routing to the iOS localization system. Use when working with .xcstrings files, Loc constants, or user-facing text.
Optional Frontmatter Fields
---
name: skill-name
description: Required description.
license: MIT
compatibility: Designed for Claude Code
metadata:
author: anytype
version: "1.0"
---
Directory Structure
skill-name/
├── SKILL.md # Required - main skill file
├── scripts/ # Optional - executable scripts
├── references/ # Optional - additional docs
└── assets/ # Optional - templates, images
Quick Checklist for New Skills
- Directory name matches
namefield - YAML frontmatter with
nameanddescription - Name is lowercase with hyphens only
- Description explains what AND when
- SKILL.md under 500 lines (use references/ for details)
- Added to
skill-rules.jsonwith keywords - Tested activation with sample prompts
⚠️ Common Issues
Hook Not Executing
Symptom: No activation messages, empty logs
Fix:
# Make hooks executable
chmod +x .claude/hooks/*.sh
# Verify
ls -l .claude/hooks/*.sh # Should show rwx
Invalid JSON
Symptom: Hook fails silently
Fix:
# Validate
jq . .claude/hooks/skill-rules.json
# If error, ask Claude to fix it
Too Many False Positives
Symptom: Skill activates too often
Fix: Make keywords more specific
- ❌ "text" → activates for everything
- ✅ "localized text" → more specific
📚 Complete Documentation
Full Guide: .claude/SKILLS_MANAGEMENT_GUIDE.md
For comprehensive coverage of:
- Detailed troubleshooting workflows
- Advanced regex patterns for intent matching
- Creating new skills from scratch
- Monitoring and maintenance
- Log rotation and cleanup
- Complete skill-rules.json reference
- Examples for every scenario
✅ Health Check Commands
# Check hook permissions
ls -l .claude/hooks/*.sh
# Validate configuration
jq . .claude/hooks/skill-rules.json
# View recent activations
tail -20 .claude/logs/skill-activations.log
# Count activations by skill
grep "Matched:" .claude/logs/skill-activations.log | sort | uniq -c
# Test specific prompt
echo '{"prompt":"your test"}' | .claude/hooks/skill-activation-prompt.sh
💡 Pro Tips
- Ask Claude to check logs - "Check the logs for my last prompt"
- Use logs for tuning - Review regularly to spot patterns
- Start broad - Add broad keywords, narrow if too many false positives
- Test everything - Always test after modifying skill-rules.json
- Document changes - Add comments in skill-rules.json
🔗 Related Docs
.claude/hooks/README.md- Complete hooks documentation.claude/skills/README.md- Skills system overviewCLAUDE.md- Main documentation
Navigation: This is a smart router. For deep troubleshooting and management details, always refer to SKILLS_MANAGEMENT_GUIDE.md.
Quick help: Just ask "Check skills system health" or "Why didn't X skill activate?"
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核