agent-skillforge 0.2.0__tar.gz → 0.3.0__tar.gz

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 (47) hide show
  1. {agent_skillforge-0.2.0/src/agent_skillforge.egg-info → agent_skillforge-0.3.0}/PKG-INFO +37 -8
  2. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/README.md +36 -7
  3. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/pyproject.toml +1 -1
  4. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0/src/agent_skillforge.egg-info}/PKG-INFO +37 -8
  5. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/agent_skillforge.egg-info/SOURCES.txt +4 -0
  6. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/__init__.py +1 -2
  7. agent_skillforge-0.3.0/src/skillforge/builtin_skills/performance-profiler/SKILL.md +35 -0
  8. agent_skillforge-0.3.0/src/skillforge/builtin_skills/security-threat-modeler/SKILL.md +37 -0
  9. agent_skillforge-0.3.0/src/skillforge/builtin_skills/skill-architect/SKILL.md +37 -0
  10. agent_skillforge-0.3.0/src/skillforge/builtin_skills/skill-architect/references/mechanics.md +27 -0
  11. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/cli.py +164 -0
  12. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/mcp_server.py +29 -0
  13. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/security.py +72 -9
  14. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/skill.py +64 -0
  15. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_builtins.py +13 -8
  16. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_cli.py +44 -0
  17. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_mcp_server.py +22 -3
  18. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_security.py +42 -0
  19. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_skill.py +23 -0
  20. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/LICENSE +0 -0
  21. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/setup.cfg +0 -0
  22. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/agent_skillforge.egg-info/dependency_links.txt +0 -0
  23. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/agent_skillforge.egg-info/entry_points.txt +0 -0
  24. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/agent_skillforge.egg-info/requires.txt +0 -0
  25. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/agent_skillforge.egg-info/top_level.txt +0 -0
  26. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/__main__.py +0 -0
  27. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/adapters.py +0 -0
  28. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/agent-observability/SKILL.md +0 -0
  29. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/antislop-code/SKILL.md +0 -0
  30. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/blast-radius-containment/SKILL.md +0 -0
  31. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/caveman/SKILL.md +0 -0
  32. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/cognitive-loop-breaker/SKILL.md +0 -0
  33. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/context-compactor/SKILL.md +0 -0
  34. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/flaky-test-isolation/SKILL.md +0 -0
  35. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/human-in-the-loop/SKILL.md +0 -0
  36. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/mcp-tool-designer/SKILL.md +0 -0
  37. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/runtime-api-verification/SKILL.md +0 -0
  38. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/self-improving-agent/SKILL.md +0 -0
  39. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/spec-driven-development/SKILL.md +0 -0
  40. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/summarize/SKILL.md +0 -0
  41. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/systematic-debugging/SKILL.md +0 -0
  42. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/tavily-search/SKILL.md +0 -0
  43. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/builtin_skills/zero-downtime-migration/SKILL.md +0 -0
  44. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/errors.py +0 -0
  45. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/src/skillforge/registry.py +0 -0
  46. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_adapters.py +0 -0
  47. {agent_skillforge-0.2.0 → agent_skillforge-0.3.0}/tests/test_registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-skillforge
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Universal package manager, security auditor, and MCP server for portable agent skills (SKILL.md).
5
5
  Author-email: gintingism <gintingism@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -75,11 +75,16 @@ skillforge add anthropics/skills:pdf
75
75
  skillforge add gintingism/skillforge:systematic-debugging
76
76
  ```
77
77
 
78
- SkillForge fetches the skill, runs a security check against it, installs it into your project's active assistant folders, and pins it in `skillforge.lock`.
78
+ SkillForge fetches the skill, runs a security check against it, installs it into your project's active assistant folders, and pins its SHA-256 package digest in `skillforge.lock`.
79
+
80
+ To install and verify all locked skills across a team checkout or CI environment:
81
+ ```bash
82
+ skillforge sync
83
+ ```
79
84
 
80
85
  ### 2. Audit a skill before running it (`audit`)
81
86
 
82
- Before letting an agent read and execute a skill, inspect it for hidden payloads and prompt injection:
87
+ Before letting an agent read and execute a skill, inspect it for hidden payloads, broken progressive disclosure links, and prompt injection:
83
88
 
84
89
  ```bash
85
90
  skillforge audit ./skills/my-new-skill
@@ -89,6 +94,7 @@ Example output:
89
94
  ```text
90
95
  Audit Report: my-new-skill
91
96
  Status: PASSED (Score: 100/100)
97
+ Context Load: 24 pointer tokens | 280 body tokens (42 lines)
92
98
  Total Findings: 0
93
99
  ```
94
100
 
@@ -97,14 +103,33 @@ What the auditor scans for:
97
103
  - **Prompt Injections & Jailbreaks (SEC-002):** Directives like `"ignore previous instructions"`, `"system override"`, or attempts to disable safety guardrails.
98
104
  - **Dangerous Shell Commands (SEC-003):** Script patterns like `curl ... | bash`, base64-decoded execution, and outbound data exfiltration.
99
105
  - **Credential Path Access (SEC-004):** Unsanctioned attempts to access `~/.ssh`, `~/.aws/credentials`, or local environment secrets.
100
- - **Trigger Quality (QUAL-001):** Checks whether descriptions contain explicit activation conditions for progressive disclosure.
106
+ - **Trigger Quality (QUAL-001):** Checks whether model-invoked descriptions contain explicit activation conditions (skipped when `disable-model-invocation: true`).
107
+ - **Directory Alignment (QUAL-002):** Verifies the package folder name matches the skill `name` in YAML frontmatter.
108
+ - **Progressive Disclosure Budget (QUAL-003):** Flags `SKILL.md` bodies exceeding 500 lines or ~5,000 tokens so heavy reference docs are moved into `references/`.
109
+ - **Broken Disclosure Pointers (QUAL-004):** Verifies every `references/...` or `scripts/...` file cited in `SKILL.md` actually exists in the package.
101
110
 
102
111
  For CI pipelines, pass `--strict` to fail on any warning, or `--json` for automation:
103
112
  ```bash
104
113
  skillforge audit ./skills/my-new-skill --strict --json
105
114
  ```
106
115
 
107
- ### 3. Check what's installed in your project (`list` & `remove`)
116
+ ### 3. Profile your project's context token budget (`budget`)
117
+
118
+ Every model-invoked skill keeps its `name` and `description` in the startup context window on every turn. Measure how much context your skills consume before they even trigger:
119
+
120
+ ```bash
121
+ skillforge budget
122
+ # Or inspect the built-in catalog:
123
+ skillforge budget --builtin
124
+ ```
125
+ ```text
126
+ Context Budget Profile (19 skills)
127
+ Always-Loaded Startup Pointer Cost: ~912 tokens
128
+ On-Demand SKILL.md Body Cost: ~5420 tokens
129
+ Disclosed Resources Cost: ~245 tokens
130
+ ```
131
+
132
+ ### 4. Check what's installed in your project (`list` & `remove`)
108
133
 
109
134
  See which skills are active across your editor targets:
110
135
 
@@ -126,7 +151,7 @@ To remove a skill from all detected assistants and update your lockfile:
126
151
  skillforge remove antislop-code
127
152
  ```
128
153
 
129
- ### 4. Create and package your own skills (`create` & `pack`)
154
+ ### 5. Create and package your own skills (`create` & `pack`)
130
155
 
131
156
  Scaffold a single skill file or a full directory package with scripts and reference docs:
132
157
 
@@ -169,10 +194,12 @@ skillforge install systematic-debugging --global
169
194
 
170
195
  ## Shipped Built-in Skills
171
196
 
172
- SkillForge ships with 16 practical engineering skills designed to counteract common agent failure modes identified in benchmark research (SWE-bench):
197
+ SkillForge ships with 19 practical engineering skills designed to counteract common agent failure modes identified in benchmark research (SWE-bench):
173
198
 
174
- ### Code Quality & Architectural Boundaries
199
+ ### Code Quality, Security & Performance
175
200
  - `blast-radius-containment`: Upstream reference tracing and a strict "file touch budget" before modifying shared code or public APIs.
201
+ - `security-threat-modeler`: Trust-boundary mapping, IDOR/BOLA object-level authorization checks, SSRF validation, and injection sink verification.
202
+ - `performance-profiler`: Baseline-first latency (`p50`/`p95`/`p99`), N+1 query detection, and algorithmic complexity verification before optimizing.
176
203
  - `antislop-code`: Comment hygiene and anti-overengineering filters (removes trivial narrative comments, stops speculative generality).
177
204
  - `spec-driven-development`: Schema-first API design and red-green verification loops before writing application logic.
178
205
  - `zero-downtime-migration`: Four-phase Expand-Contract pattern for non-breaking database schema and API payload evolutions.
@@ -184,6 +211,7 @@ SkillForge ships with 16 practical engineering skills designed to counteract com
184
211
  - `runtime-api-verification`: Interactive signature introspection (`inspect`, `dir()`, compiler definitions) to prevent hallucinated kwargs.
185
212
 
186
213
  ### Context Efficiency & Multi-Agent Operations
214
+ - `skill-architect`: Multi-file progressive disclosure guide (bundled with `references/mechanics.md`) for authoring low-token `SKILL.md`, `AGENTS.md`, and `CLAUDE.md` files.
187
215
  - `caveman`: Terse, high-density technical communication mode that reduces token spend while preserving exact paths, commands, and errors.
188
216
  - `context-compactor`: Structured state distillation and active hypothesis ledgers for long-running agent threads nearing context limits.
189
217
  - `mcp-tool-designer`: Type-safe schema design, idempotent hints, token boundaries, and stderr error separation for MCP servers.
@@ -216,6 +244,7 @@ SkillForge can run as an MCP server so your agent can search, read, and audit sk
216
244
  Exposed MCP tools:
217
245
  - `search_skills(query, limit)`: Search local and built-in skill catalogs.
218
246
  - `get_skill(name)`: Read the full `SKILL.md` instructions.
247
+ - `get_skill_resource(name, resource_path)`: Read disclosed `references/*` or `scripts/*` files from a skill package on demand.
219
248
  - `validate_skill(content)`: Test frontmatter syntax.
220
249
  - `audit_skill(content)`: Audit a raw skill document for prompt injections and malicious patterns.
221
250
  - `skill://{name}`: Resource URI for direct document retrieval.
@@ -37,11 +37,16 @@ skillforge add anthropics/skills:pdf
37
37
  skillforge add gintingism/skillforge:systematic-debugging
38
38
  ```
39
39
 
40
- SkillForge fetches the skill, runs a security check against it, installs it into your project's active assistant folders, and pins it in `skillforge.lock`.
40
+ SkillForge fetches the skill, runs a security check against it, installs it into your project's active assistant folders, and pins its SHA-256 package digest in `skillforge.lock`.
41
+
42
+ To install and verify all locked skills across a team checkout or CI environment:
43
+ ```bash
44
+ skillforge sync
45
+ ```
41
46
 
42
47
  ### 2. Audit a skill before running it (`audit`)
43
48
 
44
- Before letting an agent read and execute a skill, inspect it for hidden payloads and prompt injection:
49
+ Before letting an agent read and execute a skill, inspect it for hidden payloads, broken progressive disclosure links, and prompt injection:
45
50
 
46
51
  ```bash
47
52
  skillforge audit ./skills/my-new-skill
@@ -51,6 +56,7 @@ Example output:
51
56
  ```text
52
57
  Audit Report: my-new-skill
53
58
  Status: PASSED (Score: 100/100)
59
+ Context Load: 24 pointer tokens | 280 body tokens (42 lines)
54
60
  Total Findings: 0
55
61
  ```
56
62
 
@@ -59,14 +65,33 @@ What the auditor scans for:
59
65
  - **Prompt Injections & Jailbreaks (SEC-002):** Directives like `"ignore previous instructions"`, `"system override"`, or attempts to disable safety guardrails.
60
66
  - **Dangerous Shell Commands (SEC-003):** Script patterns like `curl ... | bash`, base64-decoded execution, and outbound data exfiltration.
61
67
  - **Credential Path Access (SEC-004):** Unsanctioned attempts to access `~/.ssh`, `~/.aws/credentials`, or local environment secrets.
62
- - **Trigger Quality (QUAL-001):** Checks whether descriptions contain explicit activation conditions for progressive disclosure.
68
+ - **Trigger Quality (QUAL-001):** Checks whether model-invoked descriptions contain explicit activation conditions (skipped when `disable-model-invocation: true`).
69
+ - **Directory Alignment (QUAL-002):** Verifies the package folder name matches the skill `name` in YAML frontmatter.
70
+ - **Progressive Disclosure Budget (QUAL-003):** Flags `SKILL.md` bodies exceeding 500 lines or ~5,000 tokens so heavy reference docs are moved into `references/`.
71
+ - **Broken Disclosure Pointers (QUAL-004):** Verifies every `references/...` or `scripts/...` file cited in `SKILL.md` actually exists in the package.
63
72
 
64
73
  For CI pipelines, pass `--strict` to fail on any warning, or `--json` for automation:
65
74
  ```bash
66
75
  skillforge audit ./skills/my-new-skill --strict --json
67
76
  ```
68
77
 
69
- ### 3. Check what's installed in your project (`list` & `remove`)
78
+ ### 3. Profile your project's context token budget (`budget`)
79
+
80
+ Every model-invoked skill keeps its `name` and `description` in the startup context window on every turn. Measure how much context your skills consume before they even trigger:
81
+
82
+ ```bash
83
+ skillforge budget
84
+ # Or inspect the built-in catalog:
85
+ skillforge budget --builtin
86
+ ```
87
+ ```text
88
+ Context Budget Profile (19 skills)
89
+ Always-Loaded Startup Pointer Cost: ~912 tokens
90
+ On-Demand SKILL.md Body Cost: ~5420 tokens
91
+ Disclosed Resources Cost: ~245 tokens
92
+ ```
93
+
94
+ ### 4. Check what's installed in your project (`list` & `remove`)
70
95
 
71
96
  See which skills are active across your editor targets:
72
97
 
@@ -88,7 +113,7 @@ To remove a skill from all detected assistants and update your lockfile:
88
113
  skillforge remove antislop-code
89
114
  ```
90
115
 
91
- ### 4. Create and package your own skills (`create` & `pack`)
116
+ ### 5. Create and package your own skills (`create` & `pack`)
92
117
 
93
118
  Scaffold a single skill file or a full directory package with scripts and reference docs:
94
119
 
@@ -131,10 +156,12 @@ skillforge install systematic-debugging --global
131
156
 
132
157
  ## Shipped Built-in Skills
133
158
 
134
- SkillForge ships with 16 practical engineering skills designed to counteract common agent failure modes identified in benchmark research (SWE-bench):
159
+ SkillForge ships with 19 practical engineering skills designed to counteract common agent failure modes identified in benchmark research (SWE-bench):
135
160
 
136
- ### Code Quality & Architectural Boundaries
161
+ ### Code Quality, Security & Performance
137
162
  - `blast-radius-containment`: Upstream reference tracing and a strict "file touch budget" before modifying shared code or public APIs.
163
+ - `security-threat-modeler`: Trust-boundary mapping, IDOR/BOLA object-level authorization checks, SSRF validation, and injection sink verification.
164
+ - `performance-profiler`: Baseline-first latency (`p50`/`p95`/`p99`), N+1 query detection, and algorithmic complexity verification before optimizing.
138
165
  - `antislop-code`: Comment hygiene and anti-overengineering filters (removes trivial narrative comments, stops speculative generality).
139
166
  - `spec-driven-development`: Schema-first API design and red-green verification loops before writing application logic.
140
167
  - `zero-downtime-migration`: Four-phase Expand-Contract pattern for non-breaking database schema and API payload evolutions.
@@ -146,6 +173,7 @@ SkillForge ships with 16 practical engineering skills designed to counteract com
146
173
  - `runtime-api-verification`: Interactive signature introspection (`inspect`, `dir()`, compiler definitions) to prevent hallucinated kwargs.
147
174
 
148
175
  ### Context Efficiency & Multi-Agent Operations
176
+ - `skill-architect`: Multi-file progressive disclosure guide (bundled with `references/mechanics.md`) for authoring low-token `SKILL.md`, `AGENTS.md`, and `CLAUDE.md` files.
149
177
  - `caveman`: Terse, high-density technical communication mode that reduces token spend while preserving exact paths, commands, and errors.
150
178
  - `context-compactor`: Structured state distillation and active hypothesis ledgers for long-running agent threads nearing context limits.
151
179
  - `mcp-tool-designer`: Type-safe schema design, idempotent hints, token boundaries, and stderr error separation for MCP servers.
@@ -178,6 +206,7 @@ SkillForge can run as an MCP server so your agent can search, read, and audit sk
178
206
  Exposed MCP tools:
179
207
  - `search_skills(query, limit)`: Search local and built-in skill catalogs.
180
208
  - `get_skill(name)`: Read the full `SKILL.md` instructions.
209
+ - `get_skill_resource(name, resource_path)`: Read disclosed `references/*` or `scripts/*` files from a skill package on demand.
181
210
  - `validate_skill(content)`: Test frontmatter syntax.
182
211
  - `audit_skill(content)`: Audit a raw skill document for prompt injections and malicious patterns.
183
212
  - `skill://{name}`: Resource URI for direct document retrieval.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agent-skillforge"
7
- version = "0.2.0"
7
+ version = "0.3.0"
8
8
  description = "Universal package manager, security auditor, and MCP server for portable agent skills (SKILL.md)."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-skillforge
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Universal package manager, security auditor, and MCP server for portable agent skills (SKILL.md).
5
5
  Author-email: gintingism <gintingism@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -75,11 +75,16 @@ skillforge add anthropics/skills:pdf
75
75
  skillforge add gintingism/skillforge:systematic-debugging
76
76
  ```
77
77
 
78
- SkillForge fetches the skill, runs a security check against it, installs it into your project's active assistant folders, and pins it in `skillforge.lock`.
78
+ SkillForge fetches the skill, runs a security check against it, installs it into your project's active assistant folders, and pins its SHA-256 package digest in `skillforge.lock`.
79
+
80
+ To install and verify all locked skills across a team checkout or CI environment:
81
+ ```bash
82
+ skillforge sync
83
+ ```
79
84
 
80
85
  ### 2. Audit a skill before running it (`audit`)
81
86
 
82
- Before letting an agent read and execute a skill, inspect it for hidden payloads and prompt injection:
87
+ Before letting an agent read and execute a skill, inspect it for hidden payloads, broken progressive disclosure links, and prompt injection:
83
88
 
84
89
  ```bash
85
90
  skillforge audit ./skills/my-new-skill
@@ -89,6 +94,7 @@ Example output:
89
94
  ```text
90
95
  Audit Report: my-new-skill
91
96
  Status: PASSED (Score: 100/100)
97
+ Context Load: 24 pointer tokens | 280 body tokens (42 lines)
92
98
  Total Findings: 0
93
99
  ```
94
100
 
@@ -97,14 +103,33 @@ What the auditor scans for:
97
103
  - **Prompt Injections & Jailbreaks (SEC-002):** Directives like `"ignore previous instructions"`, `"system override"`, or attempts to disable safety guardrails.
98
104
  - **Dangerous Shell Commands (SEC-003):** Script patterns like `curl ... | bash`, base64-decoded execution, and outbound data exfiltration.
99
105
  - **Credential Path Access (SEC-004):** Unsanctioned attempts to access `~/.ssh`, `~/.aws/credentials`, or local environment secrets.
100
- - **Trigger Quality (QUAL-001):** Checks whether descriptions contain explicit activation conditions for progressive disclosure.
106
+ - **Trigger Quality (QUAL-001):** Checks whether model-invoked descriptions contain explicit activation conditions (skipped when `disable-model-invocation: true`).
107
+ - **Directory Alignment (QUAL-002):** Verifies the package folder name matches the skill `name` in YAML frontmatter.
108
+ - **Progressive Disclosure Budget (QUAL-003):** Flags `SKILL.md` bodies exceeding 500 lines or ~5,000 tokens so heavy reference docs are moved into `references/`.
109
+ - **Broken Disclosure Pointers (QUAL-004):** Verifies every `references/...` or `scripts/...` file cited in `SKILL.md` actually exists in the package.
101
110
 
102
111
  For CI pipelines, pass `--strict` to fail on any warning, or `--json` for automation:
103
112
  ```bash
104
113
  skillforge audit ./skills/my-new-skill --strict --json
105
114
  ```
106
115
 
107
- ### 3. Check what's installed in your project (`list` & `remove`)
116
+ ### 3. Profile your project's context token budget (`budget`)
117
+
118
+ Every model-invoked skill keeps its `name` and `description` in the startup context window on every turn. Measure how much context your skills consume before they even trigger:
119
+
120
+ ```bash
121
+ skillforge budget
122
+ # Or inspect the built-in catalog:
123
+ skillforge budget --builtin
124
+ ```
125
+ ```text
126
+ Context Budget Profile (19 skills)
127
+ Always-Loaded Startup Pointer Cost: ~912 tokens
128
+ On-Demand SKILL.md Body Cost: ~5420 tokens
129
+ Disclosed Resources Cost: ~245 tokens
130
+ ```
131
+
132
+ ### 4. Check what's installed in your project (`list` & `remove`)
108
133
 
109
134
  See which skills are active across your editor targets:
110
135
 
@@ -126,7 +151,7 @@ To remove a skill from all detected assistants and update your lockfile:
126
151
  skillforge remove antislop-code
127
152
  ```
128
153
 
129
- ### 4. Create and package your own skills (`create` & `pack`)
154
+ ### 5. Create and package your own skills (`create` & `pack`)
130
155
 
131
156
  Scaffold a single skill file or a full directory package with scripts and reference docs:
132
157
 
@@ -169,10 +194,12 @@ skillforge install systematic-debugging --global
169
194
 
170
195
  ## Shipped Built-in Skills
171
196
 
172
- SkillForge ships with 16 practical engineering skills designed to counteract common agent failure modes identified in benchmark research (SWE-bench):
197
+ SkillForge ships with 19 practical engineering skills designed to counteract common agent failure modes identified in benchmark research (SWE-bench):
173
198
 
174
- ### Code Quality & Architectural Boundaries
199
+ ### Code Quality, Security & Performance
175
200
  - `blast-radius-containment`: Upstream reference tracing and a strict "file touch budget" before modifying shared code or public APIs.
201
+ - `security-threat-modeler`: Trust-boundary mapping, IDOR/BOLA object-level authorization checks, SSRF validation, and injection sink verification.
202
+ - `performance-profiler`: Baseline-first latency (`p50`/`p95`/`p99`), N+1 query detection, and algorithmic complexity verification before optimizing.
176
203
  - `antislop-code`: Comment hygiene and anti-overengineering filters (removes trivial narrative comments, stops speculative generality).
177
204
  - `spec-driven-development`: Schema-first API design and red-green verification loops before writing application logic.
178
205
  - `zero-downtime-migration`: Four-phase Expand-Contract pattern for non-breaking database schema and API payload evolutions.
@@ -184,6 +211,7 @@ SkillForge ships with 16 practical engineering skills designed to counteract com
184
211
  - `runtime-api-verification`: Interactive signature introspection (`inspect`, `dir()`, compiler definitions) to prevent hallucinated kwargs.
185
212
 
186
213
  ### Context Efficiency & Multi-Agent Operations
214
+ - `skill-architect`: Multi-file progressive disclosure guide (bundled with `references/mechanics.md`) for authoring low-token `SKILL.md`, `AGENTS.md`, and `CLAUDE.md` files.
187
215
  - `caveman`: Terse, high-density technical communication mode that reduces token spend while preserving exact paths, commands, and errors.
188
216
  - `context-compactor`: Structured state distillation and active hypothesis ledgers for long-running agent threads nearing context limits.
189
217
  - `mcp-tool-designer`: Type-safe schema design, idempotent hints, token boundaries, and stderr error separation for MCP servers.
@@ -216,6 +244,7 @@ SkillForge can run as an MCP server so your agent can search, read, and audit sk
216
244
  Exposed MCP tools:
217
245
  - `search_skills(query, limit)`: Search local and built-in skill catalogs.
218
246
  - `get_skill(name)`: Read the full `SKILL.md` instructions.
247
+ - `get_skill_resource(name, resource_path)`: Read disclosed `references/*` or `scripts/*` files from a skill package on demand.
219
248
  - `validate_skill(content)`: Test frontmatter syntax.
220
249
  - `audit_skill(content)`: Audit a raw skill document for prompt injections and malicious patterns.
221
250
  - `skill://{name}`: Resource URI for direct document retrieval.
@@ -25,8 +25,12 @@ src/skillforge/builtin_skills/context-compactor/SKILL.md
25
25
  src/skillforge/builtin_skills/flaky-test-isolation/SKILL.md
26
26
  src/skillforge/builtin_skills/human-in-the-loop/SKILL.md
27
27
  src/skillforge/builtin_skills/mcp-tool-designer/SKILL.md
28
+ src/skillforge/builtin_skills/performance-profiler/SKILL.md
28
29
  src/skillforge/builtin_skills/runtime-api-verification/SKILL.md
30
+ src/skillforge/builtin_skills/security-threat-modeler/SKILL.md
29
31
  src/skillforge/builtin_skills/self-improving-agent/SKILL.md
32
+ src/skillforge/builtin_skills/skill-architect/SKILL.md
33
+ src/skillforge/builtin_skills/skill-architect/references/mechanics.md
30
34
  src/skillforge/builtin_skills/spec-driven-development/SKILL.md
31
35
  src/skillforge/builtin_skills/summarize/SKILL.md
32
36
  src/skillforge/builtin_skills/systematic-debugging/SKILL.md
@@ -1,4 +1,3 @@
1
1
  """SkillForge: portable skills for AI coding assistants."""
2
2
 
3
- __version__ = "0.1.0"
4
-
3
+ __version__ = "0.3.0"
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: performance-profiler
3
+ description: Isolate latency bottlenecks, N+1 query patterns, memory allocations, and algorithmic complexity regressions using baseline-first measurement. Use when optimizing slow endpoints, high CPU/memory usage, or database queries.
4
+ license: MIT
5
+ compatibility: Universal
6
+ metadata:
7
+ version: "1.0.0"
8
+ author: "SkillForge Team"
9
+ ---
10
+
11
+ # Performance Profiler Protocol
12
+
13
+ Never optimize by intuition. Measure baseline latency, query count, or allocation volume before modifying code, and prove the delta with a repeatable benchmark.
14
+
15
+ ## 1. Capture the Baseline
16
+
17
+ 1. **Reproduce with Realistic Cardinality**:
18
+ - Run the target path against representative dataset sizes ($N \ge 10^3$ rows or items) rather than trivial unit-test fixtures ($N = 2$).
19
+ 2. **Record Primary Metrics**:
20
+ - Capture wall-clock latency (`p50`, `p95`, `p99`), total SQL/RPC round-trips per request, or peak heap allocation before touching implementation code.
21
+
22
+ ## 2. Isolate the Dominant Bottleneck
23
+
24
+ - **I/O & Query Amplification (N+1)**:
25
+ - Check whether loop bodies issue sequential queries, network calls, or filesystem reads. Batch into a single `WHERE id IN (...)` query, join, or bulk RPC.
26
+ - **Algorithmic Complexity ($O(N^2)$ Traps)**:
27
+ - Replace repeated linear scans (`item in list`, nested filter loops, repeated string/array concatenation) with hash sets, indexed maps, or single-pass accumulators.
28
+ - **Serialization & Payload Bloat**:
29
+ - Project only required columns (`SELECT id, status` instead of `SELECT *`), stream large responses, and avoid re-parsing static configurations inside hot loops.
30
+ - **Unbounded Concurrency or Lock Contention**:
31
+ - Bound parallel fan-out with semaphores and keep network/disk I/O outside database transactions or mutex locks.
32
+
33
+ ## 3. Verification Gate
34
+
35
+ - Re-run the exact baseline harness after the change and report `before -> after` metrics (latency, query count, or memory) alongside passing functional tests.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: security-threat-modeler
3
+ description: Map trust boundaries, attack surfaces, object-level authorization (IDOR/BOLA), SSRF vectors, and injection sinks before shipping backend or agent endpoints. Use when reviewing security, designing APIs, or auditing auth flows.
4
+ license: MIT
5
+ compatibility: Universal
6
+ metadata:
7
+ version: "1.0.0"
8
+ author: "SkillForge Team"
9
+ ---
10
+
11
+ # Security Threat Modeler Protocol
12
+
13
+ Perform structured trust-boundary and attack-surface analysis before merging authentication, API, webhook, file-handling, or tool-execution changes.
14
+
15
+ ## 1. Enumerate Trust Boundaries
16
+
17
+ 1. **Identify Untrusted Inputs**:
18
+ - List every external entry point: HTTP params, headers, webhook bodies, uploaded archives, database records containing user text, and LLM/tool outputs.
19
+ 2. **Trace Principal & Tenant Scope**:
20
+ - Verify how the caller's identity (`user_id`, `org_id`, `role`) is bound to the session token rather than read from request parameters.
21
+
22
+ ## 2. High-Severity Vulnerability Checklist
23
+
24
+ - **Broken Object Level Authorization (IDOR / BOLA)**:
25
+ - Scope every read, update, and delete query by both resource ID and authenticated tenant/owner (`WHERE id = :id AND org_id = :auth_org_id`).
26
+ - **Server-Side Request Forgery (SSRF)**:
27
+ - Reject user-supplied URLs targeting loopback (`127.0.0.0/8`, `::1`), link-local metadata (`169.254.169.254`), and RFC1918 private ranges; validate resolved IP addresses immediately before connecting.
28
+ - **Path Traversal & Archive Extraction**:
29
+ - Resolve candidate paths with `Path.resolve()` and assert `target.is_relative_to(base_dir)` before reading, writing, or extracting zip/tar members.
30
+ - **Command & Query Injection**:
31
+ - Execute subprocesses as argument arrays with `shell=False` and bind all SQL parameters via parameterized queries.
32
+ - **Webhook & Callback Authenticity**:
33
+ - Verify HMAC signatures using constant-time comparison (`hmac.compare_digest`) over the raw request body and enforce timestamp replay windows.
34
+
35
+ ## 3. Completion Gate
36
+
37
+ - Write at least one negative security test proving an unauthorized tenant, traversed path, or forged signature is rejected with an explicit error status.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: skill-architect
3
+ description: Design, author, and refactor SKILL.md packages, AGENTS.md catalogs, and CLAUDE.md instructions using progressive disclosure and context-budget discipline. Use when creating or optimizing agent skills and instruction files.
4
+ license: MIT
5
+ compatibility: Universal
6
+ metadata:
7
+ version: "1.0.0"
8
+ author: "SkillForge Team"
9
+ ---
10
+
11
+ # Skill Architect Protocol
12
+
13
+ Author high-signal, low-token agent documents (`SKILL.md`, `AGENTS.md`, `CLAUDE.md`) that maximize execution accuracy without bloating the startup context window.
14
+
15
+ ## 1. Three-Tier Context Hierarchy
16
+
17
+ 1. **Tier 1 — Always-Loaded Pointer (`name` + `description`)**:
18
+ - Every model-invoked skill's `name` and `description` remain in the startup context on every turn.
19
+ - Front-load the capability and explicit trigger condition within the first 200 characters: *"Design, author, and refactor... Use when..."*.
20
+ - For user-only slash workflows that should never auto-trigger, set `disable-model-invocation: true` to drop startup token cost to zero.
21
+ 2. **Tier 2 — On-Demand Procedure (`SKILL.md` body)**:
22
+ - Keep `SKILL.md` under **500 lines** and **5,000 tokens**.
23
+ - Include only the decision tree, numbered workflow steps, and verification commands needed during execution.
24
+ 3. **Tier 3 — Disclosed Deep Reference (`references/` & `scripts/`)**:
25
+ - Move large schemas, edge-case tables, and deterministic helpers into `references/` or `scripts/`.
26
+ - Link each file with an explicit load condition (for example: read `references/mechanics.md` when choosing frontmatter fields or invocation modes).
27
+
28
+ ## 2. Authoring Rules
29
+
30
+ - **Prefer Pointers over Copies**: Point to canonical files (`src/auth/middleware.py`) instead of pasting code blocks that go stale.
31
+ - **Lead Every Step with the Action**: Start bullet points and numbered steps with the verb or command (`Run pytest -q`, `Inspect lockfile`, `Reject unsigned payloads`).
32
+ - **Steer Positively**: Whenever prohibiting an anti-pattern, state the concrete alternative in the same sentence (*"Do not mock the database; run against the local SQLite fixture"*).
33
+ - **Define Checkable Exit Gates**: Replace vague directives (*"ensure high quality"*) with executable gates (`skillforge audit <path> --strict`, `pytest`, `mypy`).
34
+
35
+ ## 3. Progressive Disclosure Reference
36
+
37
+ - Read `references/mechanics.md` when configuring frontmatter fields, `disable-model-invocation`, or context budget thresholds.
@@ -0,0 +1,27 @@
1
+ # Skill Invocation & Context Budget Mechanics
2
+
3
+ ## Startup Discovery Budget
4
+
5
+ Agent harnesses inject a compact catalog of all model-invoked skills at session startup.
6
+
7
+ | Metric | Recommended Limit | Hard Ceiling |
8
+ |--------|-------------------|--------------|
9
+ | `description` length | <= 220 characters | 1024 characters |
10
+ | Startup pointer cost per skill | 25–60 tokens | 100 tokens |
11
+ | `SKILL.md` body length | <= 300 lines | 500 lines / 5,000 tokens |
12
+
13
+ ## Model-Invoked vs. User-Invoked Skills
14
+
15
+ 1. **Model-Invoked (Default)**:
16
+ - `disable-model-invocation` is omitted or `false`.
17
+ - Must include trigger keywords (`Use when`, `When`, `For`) in `description` so the model routes matching tasks accurately (`QUAL-001`).
18
+ 2. **User-Invoked (`disable-model-invocation: true`)**:
19
+ - Triggered explicitly by the user via `/skill-name`.
20
+ - Consumes **0 startup pointer tokens**.
21
+ - Do not include model trigger clauses in `description`; summarize only what the command executes for human readers.
22
+
23
+ ## Verification Checklist
24
+
25
+ 1. Run `skillforge validate <skill-dir>` to verify schema compliance.
26
+ 2. Run `skillforge audit <skill-dir> --strict` to verify zero prompt-injection patterns, intact `references/` and `scripts/` pointers (`QUAL-004`), and body budget compliance (`QUAL-003`).
27
+ 3. Run `skillforge budget -p <project>` to inspect total startup pointer tokens across all installed skills.