neo-skill 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.shared/skill-creator/data/domains.json +56 -0
  2. package/.shared/skill-creator/data/output-patterns.csv +8 -0
  3. package/.shared/skill-creator/data/resource-patterns.csv +8 -0
  4. package/.shared/skill-creator/data/skill-reasoning.csv +11 -0
  5. package/.shared/skill-creator/data/trigger-patterns.csv +8 -0
  6. package/.shared/skill-creator/data/validation-rules.csv +11 -0
  7. package/.shared/skill-creator/data/workflow-patterns.csv +6 -0
  8. package/.shared/skill-creator/scripts/generate.py +300 -0
  9. package/.shared/skill-creator/scripts/package.py +140 -0
  10. package/.shared/skill-creator/scripts/search.py +231 -0
  11. package/.shared/skill-creator/scripts/validate.py +213 -0
  12. package/LICENSE +21 -0
  13. package/README.md +117 -0
  14. package/bin/omni-skill.js +55 -0
  15. package/bin/skill-creator.js +55 -0
  16. package/package.json +25 -0
  17. package/skills/review-gate/references/review-gate.md +228 -0
  18. package/skills/review-gate/skillspec.json +131 -0
  19. package/skills/skill-creator/references/output-patterns.md +82 -0
  20. package/skills/skill-creator/references/pre-delivery-checklist.md +70 -0
  21. package/skills/skill-creator/references/requirement-collection.md +80 -0
  22. package/skills/skill-creator/references/skill-system-design.md +112 -0
  23. package/skills/skill-creator/references/sources.md +5 -0
  24. package/skills/skill-creator/references/workflow-step-editing.md +103 -0
  25. package/skills/skill-creator/references/workflows.md +28 -0
  26. package/skills/skill-creator/scripts/init_skill.py +34 -0
  27. package/skills/skill-creator/scripts/package_skill.py +34 -0
  28. package/skills/skill-creator/scripts/validate_skill.py +35 -0
  29. package/skills/skill-creator/skillspec.json +117 -0
  30. package/src/omni_skill/__init__.py +1 -0
  31. package/src/omni_skill/cli.py +270 -0
  32. package/src/skill_creator/__init__.py +1 -0
  33. package/src/skill_creator/cli.py +278 -0
  34. package/src/skill_creator/packaging/package.py +30 -0
  35. package/src/skill_creator/packaging/ziputil.py +26 -0
  36. package/src/skill_creator/spec/model.py +111 -0
  37. package/src/skill_creator/spec/render.py +108 -0
  38. package/src/skill_creator/spec/validate.py +18 -0
  39. package/src/skill_creator/targets/claude.py +53 -0
  40. package/src/skill_creator/targets/common.py +46 -0
  41. package/src/skill_creator/targets/cursor.py +34 -0
  42. package/src/skill_creator/targets/github_skills.py +40 -0
  43. package/src/skill_creator/targets/windsurf.py +123 -0
  44. package/src/skill_creator/util/frontmatter.py +24 -0
  45. package/src/skill_creator/util/fs.py +32 -0
@@ -0,0 +1,112 @@
1
+ # Skill System Design
2
+
3
+ How to design a complete skill system using the search tool and reasoning rules.
4
+
5
+ ## Design System Generation
6
+
7
+ Use the search tool to generate a comprehensive skill system:
8
+
9
+ ```bash
10
+ python3 .shared/skill-creator/scripts/search.py "<keywords>" --skill-system -p "<project_name>"
11
+ ```
12
+
13
+ This command:
14
+ 1. Searches all domains (workflow, output, resource, trigger, validation)
15
+ 2. Applies reasoning rules from `skill-reasoning.csv`
16
+ 3. Returns complete design: pattern, output, resources, rules
17
+
18
+ ## Design Components
19
+
20
+ ### 1. Workflow Pattern
21
+
22
+ Choose based on task complexity:
23
+
24
+ | Pattern | When to Use | Example |
25
+ |---------|-------------|---------|
26
+ | Sequential | Linear tasks, clear dependencies | collect → generate → validate |
27
+ | Conditional | Multiple paths, feature flags | if new: create else: update |
28
+ | Gated | Quality-critical, multi-phase | step → gate → step → gate |
29
+ | Parallel | Independent subtasks | [search_a, search_b] → merge |
30
+ | Iterative | Refinement, feedback loops | draft → review → revise |
31
+
32
+ ### 2. Output Pattern
33
+
34
+ Match output to task type:
35
+
36
+ | Task Type | Output Pattern | Template Location |
37
+ |-----------|---------------|-------------------|
38
+ | Review/Audit | Checklist | `references/checklist-template.md` |
39
+ | Generation | Code + Tree | inline or `scripts/` |
40
+ | Analysis | Report | `references/report-template.md` |
41
+ | Fix/Debug | Patch/Diff | inline |
42
+ | Transform | Structured data | `assets/` |
43
+
44
+ ### 3. Resource Strategy
45
+
46
+ Apply progressive disclosure:
47
+
48
+ | Content Type | Location | When |
49
+ |--------------|----------|------|
50
+ | Rules/Guidelines | `references/` | Static knowledge AI reads |
51
+ | Data/Templates | `assets/` | Structured, searchable data |
52
+ | Deterministic ops | `scripts/` | Reproducible execution |
53
+ | Cross-skill shared | `.shared/` | Reusable across skills |
54
+ | Step-local only | `notes` field | Truly unique to one step |
55
+
56
+ ### 4. Reasoning Rules
57
+
58
+ Common reasoning patterns from `skill-reasoning.csv`:
59
+
60
+ | Condition | Recommendation | Rationale |
61
+ |-----------|---------------|-----------|
62
+ | Deterministic output | Use scripts/ | Reproducible results |
63
+ | Large context (>2000 tokens) | Progressive disclosure | Split into references/ |
64
+ | Reusable rules | Shared data | Move to .shared/ |
65
+ | Multi-step workflow | Sequential with gates | Validation between phases |
66
+ | User input required | Collect step first | Ensure requirements met |
67
+ | Error-prone step | Add gate | Clear error messages |
68
+
69
+ ## Master + Overrides Pattern
70
+
71
+ For complex skills, use hierarchical configuration:
72
+
73
+ ### Master (skillspec.json)
74
+ - Contains all default rules
75
+ - Single source of truth
76
+ - All steps reference it
77
+
78
+ ### Overrides (references/<context>.md)
79
+ - Context-specific deviations
80
+ - Override master for specific pages/steps
81
+ - Document why deviation is needed
82
+
83
+ ### Lookup Order
84
+ 1. Check `references/<context>.md` for specific context
85
+ 2. Fall back to `skillspec.json` defaults
86
+ 3. Fall back to `.shared/` common patterns
87
+
88
+ ## Example Design Session
89
+
90
+ **Input**: "code review skill for TypeScript projects"
91
+
92
+ ```bash
93
+ python3 .shared/skill-creator/scripts/search.py "code review typescript audit" --skill-system -p "ts-review"
94
+ ```
95
+
96
+ **Output**:
97
+ ```
98
+ ╔════════════════════════════════════════════════════════════════╗
99
+ ║ SKILL SYSTEM: ts-review ║
100
+ ╠════════════════════════════════════════════════════════════════╣
101
+ ║ WORKFLOW: Gated Workflow ║
102
+ ║ Checkpoints that must pass before proceeding ║
103
+ ║ OUTPUT: Checklist Pattern ║
104
+ ║ Actionable items with status ║
105
+ ║ RESOURCES: Reference Documents ║
106
+ ╠════════════════════════════════════════════════════════════════╣
107
+ ║ APPLICABLE RULES: ║
108
+ ║ • review_task: checklist_output ║
109
+ ║ • multi_step_workflow: sequential_with_gates ║
110
+ ║ • large_context: progressive_disclosure ║
111
+ ╚════════════════════════════════════════════════════════════════╝
112
+ ```
@@ -0,0 +1,5 @@
1
+ # Sources / Notes
2
+
3
+ - Agent Skills spec (progressive disclosure, metadata): https://agentskills.io/specification
4
+ - Anthropic agent skills repo (skill-creator example): https://github.com/anthropics/skills
5
+ - ui-ux-pro-max-skill (multi-assistant adapters + shared data/scripts): https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
@@ -0,0 +1,103 @@
1
+ # Workflow Step Editing Protocol
2
+
3
+ Use this protocol when the task is to update an existing skill (not create a new one) by modifying `workflow.steps` in `skills/<skill>/skillspec.json`.
4
+
5
+ ## Inputs (must collect)
6
+
7
+ - **Target**: which existing skill to update (`<skill>`)
8
+ - **Current spec**: contents of `skills/<skill>/skillspec.json`
9
+ - **New requirements**: the user's new needs (can be bullets, examples, constraints)
10
+ - **Constraints**: hard limits (tools allowed, compatibility, fail-fast gates, etc.)
11
+ - **Knowledge base structure**: what should live in `references/` (rules/specs/templates) vs `assets/` (data/templates) vs `scripts/` (deterministic execution)
12
+
13
+ ## Output contract (must produce)
14
+
15
+ - **Change summary**
16
+ - Added steps
17
+ - Removed steps
18
+ - Merged steps
19
+ - Step edits (notes/commands/kind/title)
20
+ - Rationale for each structural change
21
+ - Knowledge base edits (references/assets/scripts)
22
+ - **Final `workflow.steps`** (as JSON array)
23
+ - **Notes on rerunning generation**
24
+
25
+ ## Step mapping procedure
26
+
27
+ 1. **Normalize requirements**
28
+ - Rewrite the user's needs into atomic requirements (one intent per line).
29
+ - Tag each as one of:
30
+ - `action` (do something)
31
+ - `gate` (must block on failure)
32
+ - `branch` (conditional/decision)
33
+
34
+ 2. **Extract current step intents**
35
+ - For each existing step, summarize:
36
+ - Primary intent
37
+ - Inputs it needs
38
+ - Outputs it produces
39
+ - Whether it is `action` / `gate`
40
+
41
+ 3. **Classify each atomic requirement**
42
+ - Try to place it into exactly one existing step.
43
+ - If it fits multiple steps, choose the one with the strongest ownership and add a short note explaining why.
44
+ - If it fits none, mark as `needs_new_step`.
45
+
46
+ 4. **Design new steps (only when needed)**
47
+ - Create a new step if:
48
+ - It introduces a new phase (new inputs, new outputs), or
49
+ - It would overload an existing step's intent.
50
+ - Step `id` rules:
51
+ - kebab-case
52
+ - stable, intent-based (avoid renaming unless necessary)
53
+ - Step `notes` rules:
54
+ - Prefer **index-style notes**: keep `workflow.steps[*].notes` short and point to canonical knowledge in `references/` or `assets/`.
55
+ - Put detailed rule text, denylist/allowlist, and examples into `references/*.md` (or `assets/*` when it is structured data).
56
+ - Only keep step-local details in `notes` when they are truly unique and cannot be shared.
57
+
58
+ 5. **Delete or merge steps (allowed but strict)**
59
+ - **Merge** only if two steps have overlapping intent and their separation no longer provides clarity or gating value.
60
+ - **Delete** only if:
61
+ - It is fully subsumed by other steps, and
62
+ - It does not represent a required gate, and
63
+ - You provide an explicit mapping showing where its responsibilities went.
64
+
65
+ ## Safety checks (must pass)
66
+
67
+ - **No lost requirements**: every atomic requirement must be mapped to a final step.
68
+ - **Gate preservation**: if an existing step is a `gate`, do not delete it unless its check is preserved elsewhere.
69
+ - **Command contract**: any step that relies on deterministic scripts must keep commands copy-pastable.
70
+ - **Minimal disruption**: prefer editing `notes/commands` over renaming/reordering steps.
71
+ - **Knowledge-base first**: if a step becomes long or rule-heavy, move the details into `references/` or `assets/` and keep the step as an index.
72
+
73
+ ## Final output template
74
+
75
+ ### Change summary
76
+
77
+ - Added steps:
78
+ - Removed steps:
79
+ - Merged steps:
80
+ - Edited steps:
81
+ - Rationale:
82
+
83
+ ### Final workflow.steps (JSON)
84
+
85
+ ```json
86
+ [
87
+ {
88
+ "id": "<id>",
89
+ "title": "<title>",
90
+ "kind": "action",
91
+ "commands": [],
92
+ "notes": "<notes>"
93
+ }
94
+ ]
95
+ ```
96
+
97
+ ### Regeneration
98
+
99
+ Regenerate multi-assistant outputs after updating the spec:
100
+
101
+ ```bash
102
+ omni-skill init --skill <skill>
103
+ ```
@@ -0,0 +1,28 @@
1
+ # Workflow Patterns
2
+
3
+ ## Sequential Workflows
4
+
5
+ For complex tasks, break operations into clear, sequential steps. It is often helpful to give Claude an overview of the process towards the beginning of SKILL.md:
6
+
7
+ ```markdown
8
+ Filling a PDF form involves these steps:
9
+
10
+ 1. Analyze the form (run analyze_form.py)
11
+ 2. Create field mapping (edit fields.json)
12
+ 3. Validate mapping (run validate_fields.py)
13
+ 4. Fill the form (run fill_form.py)
14
+ 5. Verify output (run verify_output.py)
15
+ ```
16
+
17
+ ## Conditional Workflows
18
+
19
+ For tasks with branching logic, guide Claude through decision points:
20
+
21
+ ```markdown
22
+ 1. Determine the modification type:
23
+ **Creating new content?** → Follow "Creation workflow" below
24
+ **Editing existing content?** → Follow "Editing workflow" below
25
+
26
+ 2. Creation workflow: [steps]
27
+ 3. Editing workflow: [steps]
28
+ ```
@@ -0,0 +1,34 @@
1
+ """skill-creator: deterministic initializer.
2
+
3
+ Thin wrapper around the repository CLI (keeps skill bundles small).
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import subprocess
9
+ import sys
10
+ from pathlib import Path
11
+
12
+
13
+ def _add_src_to_path() -> None:
14
+ repo_root = Path(__file__).resolve().parents[3]
15
+ src = repo_root / "src"
16
+ if str(src) not in sys.path:
17
+ sys.path.insert(0, str(src))
18
+
19
+
20
+ def main() -> int:
21
+ # Usage:
22
+ # python3 skills/skill-creator/scripts/init_skill.py <skill-name> [--description "..."]
23
+ if len(sys.argv) < 2:
24
+ print('Usage: python3 skills/skill-creator/scripts/init_skill.py <skill-name> [--description "..."]')
25
+ return 2
26
+ _add_src_to_path()
27
+ name = sys.argv[1]
28
+ extra = sys.argv[2:]
29
+ cmd = [sys.executable, "-m", "skill_creator.cli", "init", name] + extra
30
+ return subprocess.call(cmd)
31
+
32
+
33
+ if __name__ == "__main__":
34
+ raise SystemExit(main())
@@ -0,0 +1,34 @@
1
+ """skill-creator: deterministic packager.
2
+
3
+ Packages a Claude-ready .skill zip.
4
+
5
+ Usage:
6
+ python3 skills/skill-creator/scripts/package_skill.py <skill-name>
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import subprocess
12
+ import sys
13
+ from pathlib import Path
14
+
15
+
16
+ def _add_src_to_path() -> None:
17
+ repo_root = Path(__file__).resolve().parents[3]
18
+ src = repo_root / "src"
19
+ if str(src) not in sys.path:
20
+ sys.path.insert(0, str(src))
21
+
22
+
23
+ def main() -> int:
24
+ if len(sys.argv) != 2:
25
+ print("Usage: python3 skills/skill-creator/scripts/package_skill.py <skill-name>")
26
+ return 2
27
+ _add_src_to_path()
28
+ skill_name = sys.argv[1]
29
+ cmd = [sys.executable, "-m", "skill_creator.cli", "package", "--target", "claude", "--skill", skill_name]
30
+ return subprocess.call(cmd)
31
+
32
+
33
+ if __name__ == "__main__":
34
+ raise SystemExit(main())
@@ -0,0 +1,35 @@
1
+ """skill-creator: deterministic validator.
2
+
3
+ Validates:
4
+ - SkillSpec schema (kebab-case name, <=10 questions, workflow exists)
5
+ - Generated Claude SKILL.md strict frontmatter (only name/description)
6
+ - Banned files inside skill bundles (README/CHANGELOG/etc)
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import subprocess
12
+ import sys
13
+ from pathlib import Path
14
+
15
+
16
+ def _add_src_to_path() -> None:
17
+ repo_root = Path(__file__).resolve().parents[3]
18
+ src = repo_root / "src"
19
+ if str(src) not in sys.path:
20
+ sys.path.insert(0, str(src))
21
+
22
+
23
+ def main() -> int:
24
+ # Usage:
25
+ # python3 skills/skill-creator/scripts/validate_skill.py skills/<skill>/skillspec.json
26
+ if len(sys.argv) != 2:
27
+ print("Usage: python3 skills/skill-creator/scripts/validate_skill.py skills/<skill>/skillspec.json")
28
+ return 2
29
+ _add_src_to_path()
30
+ cmd = [sys.executable, "-m", "skill_creator.cli", "validate", sys.argv[1]]
31
+ return subprocess.call(cmd)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ raise SystemExit(main())
@@ -0,0 +1,117 @@
1
+ {
2
+ "version": 1,
3
+ "name": "skill-creator",
4
+ "description": "对话式收集需求(最多 10 问),生成 Windsurf workflow(主要目标)+ Claude/Cursor/GitHub Skills 兼容输出。支持多级数据索引、共享资源架构、Master+Overrides 模式。",
5
+ "primary_target": "windsurf",
6
+ "backward_compat": ["claude", "cursor", "github"],
7
+ "questions": [
8
+ "这个 skill 的一句话目标是什么(动词开头,面向可重复任务)?",
9
+ "用户会用哪些触发语句/关键词来表述这个需求(至少 5 条)?",
10
+ "期望输出是什么形态(报告/代码/补丁/命令/文件树/清单等)?",
11
+ "硬约束有哪些(例如不可改变行为/不可联网/必须跑测试等)?",
12
+ "允许使用的工具边界是什么(shell/git/python/读写文件/网络等)?",
13
+ "需要哪些输入(repo/commit/diff/config/logs 等),从哪里来?",
14
+ "工作流要拆成哪些关键步骤/分支?关键 gate 是什么?",
15
+ "常见失败/边界情况有哪些?希望如何处理(停止/回退/提示)?",
16
+ "哪些内容应放到 references/(规则)、assets/(数据)、scripts/(确定性执行)或 .shared/(跨skill复用)?"
17
+ ],
18
+ "triggers": [
19
+ "我想做一个 skill",
20
+ "帮我生成 Windsurf workflow",
21
+ "帮我生成 SKILL.md",
22
+ "把我的 prompt 工作流变成 skill",
23
+ "帮我在已有 skill 的基础上补充/重构 workflow steps",
24
+ "做一个 skill 库/skill creator",
25
+ "打包成 Claude .skill",
26
+ "create a new skill",
27
+ "generate workflow for my task"
28
+ ],
29
+ "freedom_level": "low",
30
+ "workflow": {
31
+ "type": "sequential",
32
+ "steps": [
33
+ {
34
+ "id": "analyze",
35
+ "title": "分析用户需求",
36
+ "kind": "action",
37
+ "commands": [],
38
+ "notes": "提取关键信息:任务类型、输出形态、约束条件、工具边界。可用搜索辅助:`python3 .shared/skill-creator/scripts/search.py \"<keywords>\" --skill-system`"
39
+ },
40
+ {
41
+ "id": "collect",
42
+ "title": "对话式收集需求(<=10 问)",
43
+ "kind": "action",
44
+ "commands": [],
45
+ "notes": "只问缺失信息;最多 10 个问题;优先级:目标 > 触发词 > 输出形态 > 约束 > 工具边界。详见 `references/requirement-collection.md`"
46
+ },
47
+ {
48
+ "id": "design",
49
+ "title": "设计 Skill 系统(Master + Overrides)",
50
+ "kind": "action",
51
+ "commands": [
52
+ "python3 .shared/skill-creator/scripts/search.py \"<task_keywords>\" --skill-system -p \"<skill_name>\""
53
+ ],
54
+ "notes": "生成完整设计:workflow pattern + output pattern + resource strategy + reasoning rules。详见 `references/skill-system-design.md`"
55
+ },
56
+ {
57
+ "id": "spec",
58
+ "title": "落地 SkillSpec(单一真源)",
59
+ "kind": "action",
60
+ "commands": [],
61
+ "notes": "写入 skills/<name>/skillspec.json;采用索引式 notes(指向 references/);确定 references/scripts/assets/.shared 分布。"
62
+ },
63
+ {
64
+ "id": "edit-workflow",
65
+ "title": "补充/重构 workflow steps",
66
+ "kind": "action",
67
+ "commands": [],
68
+ "notes": "更新已有 skill 时:读取现有 spec → 归类新需求到已有 step → 必要时新增/合并 step → 输出变更摘要。协议见 `references/workflow-step-editing.md`"
69
+ },
70
+ {
71
+ "id": "generate",
72
+ "title": "生成 Windsurf workflow(+ 兼容输出)",
73
+ "kind": "action",
74
+ "commands": [
75
+ "python3 .shared/skill-creator/scripts/generate.py skills/<skill>/skillspec.json",
76
+ "python3 .shared/skill-creator/scripts/generate.py skills/<skill>/skillspec.json --all"
77
+ ],
78
+ "notes": "默认只生成 Windsurf;--all 生成全部兼容目标(Claude/Cursor/GitHub)。"
79
+ },
80
+ {
81
+ "id": "validate",
82
+ "title": "校验(spec + outputs + 结构)",
83
+ "kind": "gate",
84
+ "commands": [
85
+ "python3 .shared/skill-creator/scripts/validate.py skills/<skill>/skillspec.json"
86
+ ],
87
+ "notes": "检查:kebab-case 命名、questions<=10、Claude frontmatter strict、无 banned files。详见 `.shared/skill-creator/data/validation-rules.csv`"
88
+ },
89
+ {
90
+ "id": "checklist",
91
+ "title": "Pre-delivery Checklist",
92
+ "kind": "gate",
93
+ "commands": [],
94
+ "notes": "交付前检查:triggers 覆盖常见表述、workflow steps 完整、references 无冗余、scripts 可执行。详见 `references/pre-delivery-checklist.md`"
95
+ },
96
+ {
97
+ "id": "package",
98
+ "title": "打包分发",
99
+ "kind": "action",
100
+ "commands": [
101
+ "python3 .shared/skill-creator/scripts/package.py --target claude --skill <skill>"
102
+ ],
103
+ "notes": "Claude .skill zip(根是 skill 文件夹);可选 --target repo 打包整个仓库。"
104
+ }
105
+ ]
106
+ },
107
+ "references": [
108
+ "references/output-patterns.md",
109
+ "references/workflows.md",
110
+ "references/workflow-step-editing.md",
111
+ "references/requirement-collection.md",
112
+ "references/skill-system-design.md",
113
+ "references/pre-delivery-checklist.md"
114
+ ],
115
+ "scripts": [],
116
+ "assets": []
117
+ }
@@ -0,0 +1 @@
1
+ __version__ = "0.1.11"