重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
skill-linter by majesticlabs-dev/majestic-marketplace
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill skill-linter| 字段 | 约束条件 |
|---|---|
name | 1-64 个字符,小写字母数字 + 连字符,不能有前导/尾随/连续连字符,必须与父目录名匹配。不能包含 "claude" 或 "anthropic"(保留词)。 |
description | 1-1024 个字符,非空,应包含便于发现的关键词。不能包含 XML 尖括号 (< >)。 |
| 字段 | 约束条件 |
|---|---|
compatibility | 1-500 个字符,环境要求 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
metadata | 键值对(仅限字符串值) |
allowed-tools | 空格分隔的工具列表(遇到逗号或数组语法则 FAIL) |
| 规则 | 要求 |
|---|---|
| 目录名 | 必须与 name 字段完全匹配 |
| SKILL.md | 必需,必须存在 |
| README.md | 技能文件夹内必须不存在(文档应放在 SKILL.md 或 references/ 中) |
| 行数限制 | SKILL.md 最多 500 行 |
| 子目录 | 仅允许 scripts/、references/、assets/ |
| 规则 | 要求 |
|---|---|
| 无 ASCII 艺术 | 制表符(─│┌┐└┘├┤┬┴┼)、箭头(↑↓←→↔)和装饰性图表会浪费 token。LLM 是按字符进行 token 化的,而不是视觉化的。请使用纯列表或表格代替。 |
| 无装饰性引用 | 励志名言或出处("正如 X 所说...")对 LLM 执行没有功能价值。 |
| 无人设声明 | "你是一位专家..." 会浪费 token。请改用 受众: / 目标: 的框架。 |
| 仅限功能性内容 | 每一行都应改进 LLM 的行为。自问:"这有助于 Claude 更好地执行吗?" |
用面向受众的框架取代角色扮演:
❌ 不好(人设):
You are an expert software engineer with deep expertise in testing.
Your role is to analyze code and generate thorough test coverage.
✅ 好(受众/目标):
**受众:** 需要为新代码或更改后的代码生成测试覆盖率的开发者。
**目标:** 根据指定的测试类型和框架生成全面的测试。
理由: "为受众 Y 解释 X" 比 "扮演角色 Z" 能产生更贴合需求的输出。
ASCII 艺术检测模式:
[─│┌┐└┘├┤┬┴┼╭╮╯╰═║╔╗╚╝╠╣╦╩╬↑↓←→↔⇒⇐⇔▲▼◄►]{3,}
匹配此模式的文件应标记以供审查。
技能描述是路由逻辑,而非文档。它们回答:
| 质量等级 | 示例 |
|---|---|
| 良好 | "在实现 Stimulus 控制器时使用。不适用于 React 组件。输出包含目标和动作的控制器。" |
| 尚可 | "在 Rails 应用程序中使用 Stimulus 控制器时使用。" |
| 较差 | "Stimulus 控制器开发技能。" |
| 反模式 | "用于构建尖端 Stimulus 控制器的全面、强大的工具包。" |
鼓励在技能内部使用模板——仅在触发时加载,本质上不占用 token。
当多个技能覆盖相似领域时,请包含负面路由:
示例(minitest 与 rspec):
| 技能 | 描述路由 |
|---|---|
minitest-coder | "编写 Minitest 测试时使用。不适用于 RSpec——请改用 rspec-coder。" |
rspec-coder | "编写 RSpec 测试时使用。不适用于 Minitest——请改用 minitest-coder。" |
"不要在...时使用" 与 "在...时使用" 对于路由准确性同样重要。
^[a-z][a-z0-9]*(-[a-z0-9]+)*$
有效: my-skill、skill1、api-v2-handler 无效: -skill、skill-、my--skill、MySkill、my_skill
技能应主要提供知识,而非编排。如果需要调用:
| 模式 | 状态 | 替代方案 |
|---|---|---|
Skill("command", args: "...") | ❌ 已弃用 | /command args |
SlashCommand("command", ...) | ❌ 已弃用 | /command args |
Task(subagent_type="agent", ...) | ✅ 正确 | (无需更改) |
✅ 首选的命令调用方式:
/majestic:config tech_stack generic
/majestic-engineer:tdd-workflow
/majestic-ralph:start "task" --max-iterations 50
❌ 已弃用的模式:
Skill("config-reader", args: "tech_stack generic")
SlashCommand("majestic:build-task", args: "...")
注意: 通过 Task() 调用代理是正确的——没有 @agent 语法。
./scripts/validate-skill.sh path/to/skill-name
for skill in plugins/*/skills/*/; do
./scripts/validate-skill.sh "$skill"
done
添加到预提交钩子或 CI 流水线中:
- name: Lint Skills
run: |
for skill in plugins/*/skills/*/; do
.claude/skills/skill-linter/scripts/validate-skill.sh "$skill" || exit 1
done
位于 scripts/validate-skill.sh 的 linter 脚本执行以下检查:
< >(安全,FAIL)| 代码 | 含义 |
|---|---|
| 0 | 所有验证通过 |
| 1 | 缺少 SKILL.md |
| 2 | 前置元数据无效 |
| 3 | 名称验证失败 |
| 4 | 描述验证失败 |
| 5 | 可选字段验证失败 |
| 6 | 超出限制行数 |
| 7 | 子目录无效 |
| 8 | 检测到 ASCII 艺术(警告) |
| 9 | 检测到人设声明 |
| 10 | 描述路由质量(警告) |
| 11 | 检测到营销文案(警告) |
Validating: plugins/majestic-tools/skills/brainstorming
[PASS] SKILL.md exists
[PASS] Frontmatter present
[PASS] Name 'brainstorming' valid (12 chars)
[PASS] Name matches directory
[PASS] Description valid (156 chars)
[PASS] Line count: 87/500
[PASS] Subdirectories valid
[PASS] No ASCII art outside code blocks
[PASS] No persona statements
[PASS] Description has routing keywords
[PASS] No marketing copy in description
Result: ALL CHECKS PASSED
每周安装量
51
代码仓库
GitHub 星标数
31
首次出现
2026年1月24日
安全审计
安装于
opencode44
gemini-cli41
claude-code41
codex39
github-copilot39
cursor39
| Field | Constraints |
|---|---|
name | 1-64 chars, lowercase alphanumeric + hyphens, no leading/trailing/consecutive hyphens, must match parent directory name. Cannot contain "claude" or "anthropic" (reserved). |
description | 1-1024 chars, non-empty, should include keywords for discoverability. No XML angle brackets (< >). |
| Field | Constraints |
|---|---|
compatibility | 1-500 chars, environment requirements |
metadata | Key-value pairs (string values only) |
allowed-tools | Space-delimited tool list (FAIL on commas or array syntax) |
| Rule | Requirement |
|---|---|
| Directory name | Must match name field exactly |
| SKILL.md | Required, must exist |
| README.md | Must NOT exist inside skill folder (docs go in SKILL.md or references/) |
| Line limit | Max 500 lines in SKILL.md |
| Subdirectories | Only scripts/, references/, assets/ allowed |
| Rule | Requirement |
|---|---|
| No ASCII art | Box-drawing characters (─│┌┐└┘├┤┬┴┼), arrows (↑↓←→↔), and decorative diagrams waste tokens. LLMs tokenize character-by-character, not visually. Use plain lists or tables instead. |
| No decorative quotes | Inspirational quotes or attributions ("As X said...") have no functional value for LLM execution. |
| No persona statements | "You are an expert..." wastes tokens. Use Audience: / Goal: framing instead. |
| Functional content only | Every line should improve LLM behavior. Ask: "Does this help Claude execute better?" |
Replace persona roleplay with audience-focused framing:
❌ Bad (persona):
You are an expert software engineer with deep expertise in testing.
Your role is to analyze code and generate thorough test coverage.
✅ Good (audience/goal):
**Audience:** Developers needing test coverage for new or changed code.
**Goal:** Generate comprehensive tests based on specified test type and framework.
Rationale: "Explain X for audience Y" yields better-tailored outputs than "Act as persona Z".
ASCII Art Detection Pattern:
[─│┌┐└┘├┤┬┴┼╭╮╯╰═║╔╗╚╝╠╣╦╩╬↑↓←→↔⇒⇐⇔▲▼◄►]{3,}
Files matching this pattern should be flagged for review.
Skill descriptions are routing logic, not documentation. They answer:
| Quality Level | Example |
|---|---|
| Good | "Use when implementing Stimulus controllers. Not for React components. Outputs controller with targets and actions." |
| Adequate | "Use when working with Stimulus controllers in Rails applications." |
| Poor | "Stimulus controller development skill." |
| Anti-pattern | "Comprehensive, powerful toolkit for building cutting-edge Stimulus controllers." |
Templates inside skills are encouraged — loaded only on trigger, essentially free tokens.
When multiple skills cover similar domains, include negative routing:
Example (minitest vs rspec):
| Skill | Description Routing |
|---|---|
minitest-coder | "Use when writing Minitest tests. Not for RSpec — use rspec-coder instead." |
rspec-coder | "Use when writing RSpec tests. Not for Minitest — use minitest-coder instead." |
"Don't use when..." is as important as "Use when..." for routing accuracy.
^[a-z][a-z0-9]*(-[a-z0-9]+)*$
Valid: my-skill, skill1, api-v2-handler Invalid: -skill, skill-, my--skill, MySkill, my_skill
Skills should primarily provide knowledge, not orchestration. If invocations are needed:
| Pattern | Status | Use Instead |
|---|---|---|
Skill("command", args: "...") | ❌ Deprecated | /command args |
SlashCommand("command", ...) | ❌ Deprecated | /command args |
Task(subagent_type="agent", ...) | ✅ Correct | (no change) |
✅ Preferred command invocation:
/majestic:config tech_stack generic
/majestic-engineer:tdd-workflow
/majestic-ralph:start "task" --max-iterations 50
❌ Deprecated patterns:
Skill("config-reader", args: "tech_stack generic")
SlashCommand("majestic:build-task", args: "...")
Note: Agent invocation via Task() is correct - there is no @agent syntax.
./scripts/validate-skill.sh path/to/skill-name
for skill in plugins/*/skills/*/; do
./scripts/validate-skill.sh "$skill"
done
Add to pre-commit hook or CI pipeline:
- name: Lint Skills
run: |
for skill in plugins/*/skills/*/; do
.claude/skills/skill-linter/scripts/validate-skill.sh "$skill" || exit 1
done
The linter script at scripts/validate-skill.sh performs these checks:
< > (security, FAIL)| Code | Meaning |
|---|---|
| 0 | All validations passed |
| 1 | Missing SKILL.md |
| 2 | Invalid frontmatter |
| 3 | Name validation failed |
| 4 | Description validation failed |
| 5 | Optional field validation failed |
| 6 | Line limit exceeded |
| 7 | Invalid subdirectory |
| 8 | ASCII art detected (warning) |
| 9 | Persona statement detected |
| 10 | Description routing quality (warning) |
| 11 | Marketing copy detected (warning) |
Validating: plugins/majestic-tools/skills/brainstorming
[PASS] SKILL.md exists
[PASS] Frontmatter present
[PASS] Name 'brainstorming' valid (12 chars)
[PASS] Name matches directory
[PASS] Description valid (156 chars)
[PASS] Line count: 87/500
[PASS] Subdirectories valid
[PASS] No ASCII art outside code blocks
[PASS] No persona statements
[PASS] Description has routing keywords
[PASS] No marketing copy in description
Result: ALL CHECKS PASSED
Based on agentskills.io/specification:
Weekly Installs
51
Repository
GitHub Stars
31
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode44
gemini-cli41
claude-code41
codex39
github-copilot39
cursor39
质量不合格品管理NCR指南:FDA IATF AS9100 ISO 13485标准下的CAPA与根本原因分析
1,400 周安装