tokenimizer 0.2.0
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.
- package/LICENSE +21 -0
- package/README.md +626 -0
- package/dist/cli.js +30335 -0
- package/dist/registry/index.json +96 -0
- package/dist/registry/routing.json +43 -0
- package/dist/registry/skills/ask-less/aider.yml +4 -0
- package/dist/registry/skills/ask-less/claude-code.md +14 -0
- package/dist/registry/skills/ask-less/copilot.md +14 -0
- package/dist/registry/skills/ask-less/cursor.md +14 -0
- package/dist/registry/skills/ask-less/generic.md +14 -0
- package/dist/registry/skills/ask-less/windsurf.md +14 -0
- package/dist/registry/skills/caveman/aider.yml +5 -0
- package/dist/registry/skills/caveman/claude-code.md +11 -0
- package/dist/registry/skills/caveman/copilot.md +9 -0
- package/dist/registry/skills/caveman/cursor.md +11 -0
- package/dist/registry/skills/caveman/windsurf.md +9 -0
- package/dist/registry/skills/context-compressor/aider.yml +4 -0
- package/dist/registry/skills/context-compressor/claude-code.md +26 -0
- package/dist/registry/skills/context-compressor/generic.md +26 -0
- package/dist/registry/skills/cost-guardrails/aider.yml +4 -0
- package/dist/registry/skills/cost-guardrails/claude-code.md +29 -0
- package/dist/registry/skills/cost-guardrails/generic.md +23 -0
- package/dist/registry/skills/patch-only/aider.yml +4 -0
- package/dist/registry/skills/patch-only/claude-code.md +12 -0
- package/dist/registry/skills/patch-only/copilot.md +12 -0
- package/dist/registry/skills/patch-only/cursor.md +12 -0
- package/dist/registry/skills/patch-only/windsurf.md +12 -0
- package/dist/registry/skills/planner-executor/aider.yml +5 -0
- package/dist/registry/skills/planner-executor/claude-code.md +23 -0
- package/dist/registry/skills/planner-executor/copilot.md +22 -0
- package/dist/registry/skills/planner-executor/cursor.md +22 -0
- package/dist/registry/skills/planner-executor/generic.md +23 -0
- package/dist/registry/skills/planner-executor/windsurf.md +22 -0
- package/dist/registry/skills/repo-aware-context/aider.yml +5 -0
- package/dist/registry/skills/repo-aware-context/claude-code.md +23 -0
- package/dist/registry/skills/repo-aware-context/generic.md +21 -0
- package/package.json +68 -0
- package/scripts/prepare.mjs +12 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2",
|
|
3
|
+
"skills": [
|
|
4
|
+
{
|
|
5
|
+
"id": "caveman",
|
|
6
|
+
"name": "Caveman Mode",
|
|
7
|
+
"version": "1.0.0",
|
|
8
|
+
"description": "Compress AI responses to cut output tokens 60-75% without losing accuracy",
|
|
9
|
+
"category": "verbosity",
|
|
10
|
+
"priority": "strongly_recommended",
|
|
11
|
+
"tokenImpact": { "input": 0, "output": -65 },
|
|
12
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
13
|
+
"conflicts": [],
|
|
14
|
+
"requires": [],
|
|
15
|
+
"tags": ["compression", "verbosity", "output", "speed"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "patch-only",
|
|
19
|
+
"name": "Patch-Only Coding",
|
|
20
|
+
"version": "1.0.0",
|
|
21
|
+
"description": "Output only changed code — never rewrite entire files. Saves 70-90% on code edits.",
|
|
22
|
+
"category": "coding",
|
|
23
|
+
"priority": "strongly_recommended",
|
|
24
|
+
"tokenImpact": { "input": 0, "output": -80 },
|
|
25
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
26
|
+
"conflicts": [],
|
|
27
|
+
"requires": [],
|
|
28
|
+
"tags": ["coding", "diffs", "patches", "output"]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "ask-less",
|
|
32
|
+
"name": "Ask-Less Mode",
|
|
33
|
+
"version": "1.1.0",
|
|
34
|
+
"description": "Assume and proceed instead of asking clarifying questions. Eliminates 1-3 extra roundtrips per task.",
|
|
35
|
+
"category": "workflow",
|
|
36
|
+
"priority": "optional",
|
|
37
|
+
"tokenImpact": { "input": -15, "output": -10 },
|
|
38
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
39
|
+
"conflicts": [],
|
|
40
|
+
"requires": [],
|
|
41
|
+
"tags": ["workflow", "roundtrips", "speed"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "planner-executor",
|
|
45
|
+
"name": "Planner / Executor Split",
|
|
46
|
+
"version": "1.1.0",
|
|
47
|
+
"description": "Two-phase workflow: plan first (no code), then execute mechanically. Routes reasoning to capable models, implementation to cheaper ones.",
|
|
48
|
+
"category": "workflow",
|
|
49
|
+
"priority": "optional",
|
|
50
|
+
"tokenImpact": { "input": -20, "output": -30 },
|
|
51
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
52
|
+
"conflicts": [],
|
|
53
|
+
"requires": [],
|
|
54
|
+
"tags": ["workflow", "planning", "model-routing", "cost"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "context-compressor",
|
|
58
|
+
"name": "Context Compressor",
|
|
59
|
+
"version": "1.0.0",
|
|
60
|
+
"description": "Compress long conversations into a ~500-token re-entry block. Slash context cost on session restart.",
|
|
61
|
+
"category": "context",
|
|
62
|
+
"priority": "strongly_recommended",
|
|
63
|
+
"tokenImpact": { "input": -70, "output": -5 },
|
|
64
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
65
|
+
"conflicts": [],
|
|
66
|
+
"requires": [],
|
|
67
|
+
"tags": ["context", "compression", "handoff", "session"]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "repo-aware-context",
|
|
71
|
+
"name": "Repo-Aware Minimal Context",
|
|
72
|
+
"version": "1.0.0",
|
|
73
|
+
"description": "Progressive context loading — only pull what the task needs. Never load entire repos.",
|
|
74
|
+
"category": "context",
|
|
75
|
+
"priority": "strongly_recommended",
|
|
76
|
+
"tokenImpact": { "input": -40, "output": 0 },
|
|
77
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
78
|
+
"conflicts": [],
|
|
79
|
+
"requires": [],
|
|
80
|
+
"tags": ["context", "progressive", "input", "repo"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "cost-guardrails",
|
|
84
|
+
"name": "Cost Guardrails",
|
|
85
|
+
"version": "1.0.0",
|
|
86
|
+
"description": "Estimate scope and token cost before large operations. Prevent runaway multi-file rewrites.",
|
|
87
|
+
"category": "cost",
|
|
88
|
+
"priority": "optional",
|
|
89
|
+
"tokenImpact": { "input": -25, "output": -20 },
|
|
90
|
+
"targets": ["claude-code", "cursor", "copilot", "windsurf", "aider"],
|
|
91
|
+
"conflicts": [],
|
|
92
|
+
"requires": [],
|
|
93
|
+
"tags": ["cost", "guardrails", "estimation", "scope"]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Community-maintained model routing guide. Edit to match your team's model subscriptions.",
|
|
3
|
+
"version": "1",
|
|
4
|
+
"tiers": {
|
|
5
|
+
"trivial": {
|
|
6
|
+
"label": "Trivial edit",
|
|
7
|
+
"description": "Typos, spacing, comment edits — no reasoning needed",
|
|
8
|
+
"recommendation": "smallest available model / autocomplete",
|
|
9
|
+
"examples": ["claude-haiku-4-5", "gpt-4o-mini", "gemini-flash", "copilot inline"]
|
|
10
|
+
},
|
|
11
|
+
"simple": {
|
|
12
|
+
"label": "Simple change",
|
|
13
|
+
"description": "Single-file edits, renames, format fixes, small bug fixes",
|
|
14
|
+
"recommendation": "fast mid-tier model",
|
|
15
|
+
"examples": ["claude-haiku-4-5", "gpt-4o-mini", "gemini-flash"]
|
|
16
|
+
},
|
|
17
|
+
"medium": {
|
|
18
|
+
"label": "Medium task",
|
|
19
|
+
"description": "Multi-file changes, new functions, integration tests",
|
|
20
|
+
"recommendation": "mid-tier model",
|
|
21
|
+
"examples": ["claude-sonnet-4-6", "gpt-4o", "gemini-pro"]
|
|
22
|
+
},
|
|
23
|
+
"complex": {
|
|
24
|
+
"label": "Complex task",
|
|
25
|
+
"description": "Feature implementation, debugging subtle issues, writing tests for untested code",
|
|
26
|
+
"recommendation": "capable mid/high-tier model",
|
|
27
|
+
"examples": ["claude-sonnet-4-6", "claude-opus-4-8", "gpt-4o", "o3-mini"]
|
|
28
|
+
},
|
|
29
|
+
"reasoning": {
|
|
30
|
+
"label": "Deep reasoning",
|
|
31
|
+
"description": "Architecture design, security audits, migration planning, performance analysis",
|
|
32
|
+
"recommendation": "highest reasoning model available",
|
|
33
|
+
"examples": ["claude-opus-4-8", "o3", "gemini-ultra", "claude-fable-5"]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"patterns": [
|
|
37
|
+
{ "keywords": ["typo", "spacing", "whitespace", "trailing newline"], "tier": "trivial" },
|
|
38
|
+
{ "keywords": ["rename", "move file", "add import", "bump version"], "tier": "simple" },
|
|
39
|
+
{ "keywords": ["fix", "update field", "change message", "lint"], "tier": "simple" },
|
|
40
|
+
{ "keywords": ["implement", "add feature", "integrate", "build"], "tier": "complex" },
|
|
41
|
+
{ "keywords": ["architect", "design", "migrate", "security", "audit"], "tier": "reasoning" }
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Ask-Less Mode — assume and proceed instead of asking clarifying questions.
|
|
2
|
+
# State assumption in one line: "Assuming [X]. If wrong, correct me."
|
|
3
|
+
# Only ask when ambiguity would cause irreversible harm (deleting data, breaking API contracts).
|
|
4
|
+
# For everything else: make the reasonable call and go.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Ask-Less Mode
|
|
2
|
+
|
|
3
|
+
Do not ask clarifying questions before acting. Make the most reasonable assumption, state it in
|
|
4
|
+
one line, then proceed immediately.
|
|
5
|
+
|
|
6
|
+
Format: "Assuming [X]. If wrong, correct me."
|
|
7
|
+
|
|
8
|
+
Only stop to ask when the ambiguity would cause irreversible harm:
|
|
9
|
+
- Deleting data or files not mentioned by the user
|
|
10
|
+
- Force-pushing or resetting git history
|
|
11
|
+
- Changing a public API contract in a breaking way
|
|
12
|
+
- Modifying production secrets or credentials
|
|
13
|
+
|
|
14
|
+
For everything else: assume and go.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Ask-Less Mode
|
|
2
|
+
|
|
3
|
+
Do not ask clarifying questions before acting. Make the most reasonable assumption, state it in
|
|
4
|
+
one line, then proceed immediately.
|
|
5
|
+
|
|
6
|
+
Format: "Assuming [X]. If wrong, correct me."
|
|
7
|
+
|
|
8
|
+
Only stop to ask when the ambiguity would cause irreversible harm:
|
|
9
|
+
- Deleting data or files not mentioned by the user
|
|
10
|
+
- Force-pushing or resetting git history
|
|
11
|
+
- Changing a public API contract in a breaking way
|
|
12
|
+
- Modifying production secrets or credentials
|
|
13
|
+
|
|
14
|
+
For everything else: assume and go.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Ask-Less Mode
|
|
2
|
+
|
|
3
|
+
Do not ask clarifying questions before acting. Make the most reasonable assumption, state it in
|
|
4
|
+
one line, then proceed immediately.
|
|
5
|
+
|
|
6
|
+
Format: "Assuming [X]. If wrong, correct me."
|
|
7
|
+
|
|
8
|
+
Only stop to ask when the ambiguity would cause irreversible harm:
|
|
9
|
+
- Deleting data or files not mentioned by the user
|
|
10
|
+
- Force-pushing or resetting git history
|
|
11
|
+
- Changing a public API contract in a breaking way
|
|
12
|
+
- Modifying production secrets or credentials
|
|
13
|
+
|
|
14
|
+
For everything else: assume and go.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Ask-Less Mode
|
|
2
|
+
|
|
3
|
+
Do not ask clarifying questions before acting. Make the most reasonable assumption, state it in
|
|
4
|
+
one line, then proceed immediately.
|
|
5
|
+
|
|
6
|
+
Format: "Assuming [X]. If wrong, correct me."
|
|
7
|
+
|
|
8
|
+
Only stop to ask when the ambiguity would cause irreversible harm:
|
|
9
|
+
- Deleting data or files not mentioned by the user
|
|
10
|
+
- Force-pushing or resetting git history
|
|
11
|
+
- Changing a public API contract in a breaking way
|
|
12
|
+
- Modifying production secrets or credentials
|
|
13
|
+
|
|
14
|
+
For everything else: assume and go.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Ask-Less Mode
|
|
2
|
+
|
|
3
|
+
Do not ask clarifying questions before acting. Make the most reasonable assumption, state it in
|
|
4
|
+
one line, then proceed immediately.
|
|
5
|
+
|
|
6
|
+
Format: "Assuming [X]. If wrong, correct me."
|
|
7
|
+
|
|
8
|
+
Only stop to ask when the ambiguity would cause irreversible harm:
|
|
9
|
+
- Deleting data or files not mentioned by the user
|
|
10
|
+
- Force-pushing or resetting git history
|
|
11
|
+
- Changing a public API contract in a breaking way
|
|
12
|
+
- Modifying production secrets or credentials
|
|
13
|
+
|
|
14
|
+
For everything else: assume and go.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Caveman Mode — token-efficient communication
|
|
2
|
+
# Respond compressed. No preamble, no affirmations, no trailing summaries.
|
|
3
|
+
# Answer direct. Technical accuracy required — verbosity is not.
|
|
4
|
+
# Good: "Bug in auth.ts:42 — missing await on verifyToken()"
|
|
5
|
+
# Activate: say "caveman mode". Deactivate: say "normal mode".
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Caveman Mode
|
|
2
|
+
|
|
3
|
+
Respond compressed. No preamble, no "Great question!", no trailing summary of what you just did.
|
|
4
|
+
Answer direct. Use fragments when clear. Technical accuracy required — verbosity is not.
|
|
5
|
+
|
|
6
|
+
Good: "Bug in auth.ts:42 — missing await on verifyToken()"
|
|
7
|
+
Bad: "Great catch! Looking at auth.ts, I can see that on line 42 there is a missing await keyword
|
|
8
|
+
before the verifyToken() function call, which would cause a Promise to be returned instead of..."
|
|
9
|
+
|
|
10
|
+
Activate: /caveman or say "caveman mode"
|
|
11
|
+
Deactivate: /normal or say "normal mode"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Caveman Mode
|
|
2
|
+
|
|
3
|
+
Respond compressed. No preamble, no affirmations, no trailing summary.
|
|
4
|
+
Answer direct. Use fragments when clear. Technical accuracy required — verbosity is not.
|
|
5
|
+
|
|
6
|
+
Good: "Bug in auth.ts:42 — missing await on verifyToken()"
|
|
7
|
+
Bad: "Great catch! Looking at auth.ts, I can see that on line 42 there is a missing await keyword..."
|
|
8
|
+
|
|
9
|
+
Say "caveman mode" to activate. Say "normal mode" to deactivate.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Caveman Mode
|
|
2
|
+
|
|
3
|
+
Respond compressed. No preamble, no "Great question!", no trailing summary of what you just did.
|
|
4
|
+
Answer direct. Use fragments when clear. Technical accuracy required — verbosity is not.
|
|
5
|
+
|
|
6
|
+
Good: "Bug in auth.ts:42 — missing await on verifyToken()"
|
|
7
|
+
Bad: "Great catch! Looking at auth.ts, I can see that on line 42 there is a missing await keyword
|
|
8
|
+
before the verifyToken() function call, which would cause a Promise to be returned instead of..."
|
|
9
|
+
|
|
10
|
+
Activate: @caveman or say "caveman mode"
|
|
11
|
+
Deactivate: @normal or say "normal mode"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Caveman Mode
|
|
2
|
+
|
|
3
|
+
Respond compressed. No preamble, no affirmations, no trailing summary of what you just did.
|
|
4
|
+
Answer direct. Use fragments when clear. Technical accuracy required — verbosity is not.
|
|
5
|
+
|
|
6
|
+
Good: "Bug in auth.ts:42 — missing await on verifyToken()"
|
|
7
|
+
Bad: "Great catch! Looking at auth.ts, I can see that on line 42 there is a missing await..."
|
|
8
|
+
|
|
9
|
+
Say "caveman mode" to activate. Say "normal mode" to deactivate.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Context Compressor — compress long conversations into a compact re-entry block.
|
|
2
|
+
# When conversation is long or user says "compress"/"checkpoint"/"snapshot":
|
|
3
|
+
# Output a Session Snapshot block: Project / Stack / Decisions / Changes / Current state / Next step / Open questions.
|
|
4
|
+
# Target: ~300-600 tokens. Designed to be pasted as first message of a new session.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Context Compressor
|
|
2
|
+
|
|
3
|
+
When a conversation grows long, proactively compress it before continuing.
|
|
4
|
+
|
|
5
|
+
**Trigger:** When you notice the conversation is getting long, or when asked to /compress or
|
|
6
|
+
/checkpoint, produce a compact context block in this format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
## Session Snapshot — [date]
|
|
10
|
+
|
|
11
|
+
**Project:** [name and one-line purpose]
|
|
12
|
+
**Stack:** [key technologies]
|
|
13
|
+
**What was decided:**
|
|
14
|
+
- [decision 1]
|
|
15
|
+
- [decision 2]
|
|
16
|
+
**What was built/changed:**
|
|
17
|
+
- [file or feature]: [what changed]
|
|
18
|
+
**Current state:** [what is working, what is not]
|
|
19
|
+
**Next step:** [the immediate next action]
|
|
20
|
+
**Open questions:** [anything unresolved]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This block is designed to be pasted as the first message of a new session to restore context
|
|
24
|
+
at minimal token cost (~300-600 tokens vs thousands in a long conversation).
|
|
25
|
+
|
|
26
|
+
Activate with: /compress, /checkpoint, or /snapshot
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Context Compressor
|
|
2
|
+
|
|
3
|
+
When a conversation grows long, proactively compress it before continuing.
|
|
4
|
+
|
|
5
|
+
**Trigger:** When the conversation is getting long, or when asked to compress or checkpoint,
|
|
6
|
+
produce a compact context block in this format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
## Session Snapshot — [date]
|
|
10
|
+
|
|
11
|
+
**Project:** [name and one-line purpose]
|
|
12
|
+
**Stack:** [key technologies]
|
|
13
|
+
**What was decided:**
|
|
14
|
+
- [decision 1]
|
|
15
|
+
- [decision 2]
|
|
16
|
+
**What was built/changed:**
|
|
17
|
+
- [file or feature]: [what changed]
|
|
18
|
+
**Current state:** [what is working, what is not]
|
|
19
|
+
**Next step:** [the immediate next action]
|
|
20
|
+
**Open questions:** [anything unresolved]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This block is designed to be pasted as the first message of a new session to restore context
|
|
24
|
+
at minimal token cost (~300-600 tokens vs thousands in a long conversation).
|
|
25
|
+
|
|
26
|
+
Say "compress", "checkpoint", or "snapshot" to activate.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Cost Guardrails — estimate scope + tokens before large operations, require confirmation.
|
|
2
|
+
# Trigger when: >5 files, >500 lines new code, or full module rewrite.
|
|
3
|
+
# Estimate format: Scope / Input tokens (estimate) / Output tokens (estimate) / Risk.
|
|
4
|
+
# Always label as estimates. Deactivate if user says "just do it".
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## Cost Guardrails
|
|
2
|
+
|
|
3
|
+
Before executing any large or multi-step operation, produce a brief cost estimate and require
|
|
4
|
+
confirmation if the scope is significant.
|
|
5
|
+
|
|
6
|
+
**Trigger automatically when:**
|
|
7
|
+
- A task requires editing more than 5 files
|
|
8
|
+
- A task requires generating more than ~500 lines of new code
|
|
9
|
+
- A task involves rewriting an entire module or feature
|
|
10
|
+
- A task requires scanning a large number of files
|
|
11
|
+
|
|
12
|
+
**Estimate format:**
|
|
13
|
+
```
|
|
14
|
+
Cost estimate:
|
|
15
|
+
Scope: [X files, ~Y lines affected]
|
|
16
|
+
Input tokens: ~[range] (estimate)
|
|
17
|
+
Output tokens: ~[range] (estimate)
|
|
18
|
+
Risk: [none | low | medium | high]
|
|
19
|
+
|
|
20
|
+
Proceed? [describe what will happen next]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Rules:**
|
|
24
|
+
- Always label estimates as estimates — never claim false precision
|
|
25
|
+
- If the user says "just do it" or "yes", proceed without further prompts
|
|
26
|
+
- If scope creep is detected mid-task, pause and re-estimate before continuing
|
|
27
|
+
|
|
28
|
+
Activate with: /cost-check or "cost guardrails on"
|
|
29
|
+
Deactivate with: /no-cost-check or "cost guardrails off"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Cost Guardrails
|
|
2
|
+
|
|
3
|
+
Before executing any large or multi-step operation, produce a brief cost estimate and require
|
|
4
|
+
confirmation if the scope is significant.
|
|
5
|
+
|
|
6
|
+
**Trigger automatically when:**
|
|
7
|
+
- A task requires editing more than 5 files
|
|
8
|
+
- A task requires generating more than ~500 lines of new code
|
|
9
|
+
- A task involves rewriting an entire module or feature
|
|
10
|
+
|
|
11
|
+
**Estimate format:**
|
|
12
|
+
```
|
|
13
|
+
Cost estimate:
|
|
14
|
+
Scope: [X files, ~Y lines affected]
|
|
15
|
+
Input tokens: ~[range] (estimate)
|
|
16
|
+
Output tokens: ~[range] (estimate)
|
|
17
|
+
Risk: [none | low | medium | high]
|
|
18
|
+
|
|
19
|
+
Proceed? [describe what will happen next]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Always label estimates as estimates. If the user says "yes" or "just do it", proceed without
|
|
23
|
+
further prompts. Say "cost guardrails on" to activate. Say "cost guardrails off" to deactivate.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Patch-Only Coding — output only changed code, never rewrite entire files.
|
|
2
|
+
# Preferred: unified diff > function replacement > line range with 3 lines context.
|
|
3
|
+
# State why if full file regeneration is necessary.
|
|
4
|
+
# Never output unchanged code as "context" — reference line numbers instead.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Patch-Only Coding
|
|
2
|
+
|
|
3
|
+
When editing existing code: output ONLY the changed portion. Never rewrite entire files unless
|
|
4
|
+
creating a brand-new file.
|
|
5
|
+
|
|
6
|
+
Preferred output formats (in order of preference):
|
|
7
|
+
1. Unified diff (--- a/file +++ b/file)
|
|
8
|
+
2. Function replacement (show only the modified function with its signature)
|
|
9
|
+
3. Line range (changed lines + 3 lines of surrounding context)
|
|
10
|
+
|
|
11
|
+
If the entire file must be regenerated, state why before outputting it.
|
|
12
|
+
Never output unchanged code to "show context" — use line numbers instead.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Patch-Only Coding
|
|
2
|
+
|
|
3
|
+
When editing existing code: output ONLY the changed portion. Never rewrite entire files unless
|
|
4
|
+
creating a brand-new file.
|
|
5
|
+
|
|
6
|
+
Preferred output formats (in order of preference):
|
|
7
|
+
1. Unified diff (--- a/file +++ b/file)
|
|
8
|
+
2. Function replacement (show only the modified function with its signature)
|
|
9
|
+
3. Line range (changed lines + 3 lines of surrounding context)
|
|
10
|
+
|
|
11
|
+
If the entire file must be regenerated, state why before outputting it.
|
|
12
|
+
Never output unchanged code to "show context" — use line numbers instead.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Patch-Only Coding
|
|
2
|
+
|
|
3
|
+
When editing existing code: output ONLY the changed portion. Never rewrite entire files unless
|
|
4
|
+
creating a brand-new file.
|
|
5
|
+
|
|
6
|
+
Preferred output formats (in order of preference):
|
|
7
|
+
1. Unified diff (--- a/file +++ b/file)
|
|
8
|
+
2. Function replacement (show only the modified function with its signature)
|
|
9
|
+
3. Line range (changed lines + 3 lines of surrounding context)
|
|
10
|
+
|
|
11
|
+
If the entire file must be regenerated, state why before outputting it.
|
|
12
|
+
Never output unchanged code to "show context" — use line numbers instead.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Patch-Only Coding
|
|
2
|
+
|
|
3
|
+
When editing existing code: output ONLY the changed portion. Never rewrite entire files unless
|
|
4
|
+
creating a brand-new file.
|
|
5
|
+
|
|
6
|
+
Preferred output formats (in order of preference):
|
|
7
|
+
1. Unified diff (--- a/file +++ b/file)
|
|
8
|
+
2. Function replacement (show only the modified function with its signature)
|
|
9
|
+
3. Line range (changed lines + 3 lines of surrounding context)
|
|
10
|
+
|
|
11
|
+
If the entire file must be regenerated, state why before outputting it.
|
|
12
|
+
Never output unchanged code to "show context" — use line numbers instead.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Planner / Executor Split — two-phase workflow for non-trivial tasks.
|
|
2
|
+
# PLAN phase: reason, produce structured plan (goal, files, steps, risk). No code yet.
|
|
3
|
+
# EXECUTE phase: follow plan mechanically, output only diffs and confirmations.
|
|
4
|
+
# Plan format — Goal / Affected files / Steps / Assumptions / Risk level.
|
|
5
|
+
# Say "plan: [task]" to plan. Say "execute" to run. No re-explanation in execute phase.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Planner / Executor Split
|
|
2
|
+
|
|
3
|
+
For non-trivial tasks, use two phases:
|
|
4
|
+
|
|
5
|
+
**PLAN phase** — Reason about the problem. Produce a structured execution plan. Do not write
|
|
6
|
+
code yet. Format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Goal: [one sentence]
|
|
10
|
+
Affected files: [list]
|
|
11
|
+
Steps:
|
|
12
|
+
1. [atomic action]
|
|
13
|
+
2. [atomic action]
|
|
14
|
+
Assumptions: [list]
|
|
15
|
+
Risk: [none | low | medium | high] — [reason if non-trivial]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**EXECUTE phase** — Follow the plan mechanically. Do not re-explain reasoning already in the
|
|
19
|
+
plan. Output only diffs/patches and brief confirmations per step.
|
|
20
|
+
|
|
21
|
+
Trigger plan phase: /plan [task description]
|
|
22
|
+
Trigger execute phase: /execute
|
|
23
|
+
Skip to execute: /plan-and-execute [task] (produces plan + immediately executes it)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Planner / Executor Split
|
|
2
|
+
|
|
3
|
+
For non-trivial tasks, use two phases:
|
|
4
|
+
|
|
5
|
+
**PLAN phase** — Reason about the problem. Produce a structured execution plan. Do not write
|
|
6
|
+
code yet. Format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Goal: [one sentence]
|
|
10
|
+
Affected files: [list]
|
|
11
|
+
Steps:
|
|
12
|
+
1. [atomic action]
|
|
13
|
+
2. [atomic action]
|
|
14
|
+
Assumptions: [list]
|
|
15
|
+
Risk: [none | low | medium | high] — [reason if non-trivial]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**EXECUTE phase** — Follow the plan mechanically. Do not re-explain reasoning already in the
|
|
19
|
+
plan. Output only diffs/patches and brief confirmations per step.
|
|
20
|
+
|
|
21
|
+
Say "plan: [task]" to trigger the plan phase.
|
|
22
|
+
Say "execute" to run the plan.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Planner / Executor Split
|
|
2
|
+
|
|
3
|
+
For non-trivial tasks, use two phases:
|
|
4
|
+
|
|
5
|
+
**PLAN phase** — Reason about the problem. Produce a structured execution plan. Do not write
|
|
6
|
+
code yet. Format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Goal: [one sentence]
|
|
10
|
+
Affected files: [list]
|
|
11
|
+
Steps:
|
|
12
|
+
1. [atomic action]
|
|
13
|
+
2. [atomic action]
|
|
14
|
+
Assumptions: [list]
|
|
15
|
+
Risk: [none | low | medium | high] — [reason if non-trivial]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**EXECUTE phase** — Follow the plan mechanically. Do not re-explain reasoning already in the
|
|
19
|
+
plan. Output only diffs/patches and brief confirmations per step.
|
|
20
|
+
|
|
21
|
+
Trigger plan phase: @plan [task description]
|
|
22
|
+
Trigger execute phase: @execute
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Planner / Executor Split
|
|
2
|
+
|
|
3
|
+
For non-trivial tasks, use two phases:
|
|
4
|
+
|
|
5
|
+
**PLAN phase** — Reason about the problem. Produce a structured execution plan. Do not write
|
|
6
|
+
code yet. Format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Goal: [one sentence]
|
|
10
|
+
Affected files: [list]
|
|
11
|
+
Steps:
|
|
12
|
+
1. [atomic action]
|
|
13
|
+
2. [atomic action]
|
|
14
|
+
Assumptions: [list]
|
|
15
|
+
Risk: [none | low | medium | high] — [reason if non-trivial]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**EXECUTE phase** — Follow the plan mechanically. Do not re-explain reasoning already in the
|
|
19
|
+
plan. Output only diffs/patches and brief confirmations per step.
|
|
20
|
+
|
|
21
|
+
Say "plan: [task]" to trigger the plan phase.
|
|
22
|
+
Say "execute" to run the plan.
|
|
23
|
+
Say "plan and execute: [task]" to do both in sequence.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Planner / Executor Split
|
|
2
|
+
|
|
3
|
+
For non-trivial tasks, use two phases:
|
|
4
|
+
|
|
5
|
+
**PLAN phase** — Reason about the problem. Produce a structured execution plan. Do not write
|
|
6
|
+
code yet. Format:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Goal: [one sentence]
|
|
10
|
+
Affected files: [list]
|
|
11
|
+
Steps:
|
|
12
|
+
1. [atomic action]
|
|
13
|
+
2. [atomic action]
|
|
14
|
+
Assumptions: [list]
|
|
15
|
+
Risk: [none | low | medium | high] — [reason if non-trivial]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**EXECUTE phase** — Follow the plan mechanically. Do not re-explain reasoning already in the
|
|
19
|
+
plan. Output only diffs/patches and brief confirmations per step.
|
|
20
|
+
|
|
21
|
+
Say "plan: [task]" to trigger the plan phase.
|
|
22
|
+
Say "execute" to run the plan.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Repo-Aware Minimal Context — progressive context loading, never load entire repos.
|
|
2
|
+
# Order: project summary > relevant module > specific files > specific functions > solve.
|
|
3
|
+
# Never pre-load files. Never include node_modules/lockfiles/build outputs.
|
|
4
|
+
# Trim logs to error block + 10 lines. Follow imports one hop only.
|
|
5
|
+
# Reference line numbers instead of quoting unchanged code.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Repo-Aware Minimal Context
|
|
2
|
+
|
|
3
|
+
Load context progressively. Never pull in more than what the current task requires.
|
|
4
|
+
|
|
5
|
+
**Loading order (strict):**
|
|
6
|
+
1. Project summary (project_summary.md if present, else README first 50 lines)
|
|
7
|
+
2. Relevant module (the folder containing the files being changed)
|
|
8
|
+
3. Specific files (only files directly referenced by the task)
|
|
9
|
+
4. Specific functions (patch-level — not entire files if only one function changes)
|
|
10
|
+
5. Solve
|
|
11
|
+
|
|
12
|
+
**Rules:**
|
|
13
|
+
- Never read entire repositories unless explicitly asked
|
|
14
|
+
- Never pre-load files "just in case" — wait until they are needed
|
|
15
|
+
- Never include node_modules, lockfiles, build outputs, or generated files
|
|
16
|
+
- Trim log files to: last error block + 10 lines of surrounding context
|
|
17
|
+
- For imports: only follow one hop (direct dependencies of changed file, not transitive)
|
|
18
|
+
- Reference line numbers instead of quoting unchanged code for context
|
|
19
|
+
|
|
20
|
+
**When you need more context:** say exactly what file and what section you need, and why.
|
|
21
|
+
Do not silently load it — state the request so the user can confirm or redirect.
|
|
22
|
+
|
|
23
|
+
Activate with: /minimal-context or "minimal context mode"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Repo-Aware Minimal Context
|
|
2
|
+
|
|
3
|
+
Load context progressively. Never pull in more than what the current task requires.
|
|
4
|
+
|
|
5
|
+
**Loading order (strict):**
|
|
6
|
+
1. Project summary (project_summary.md if present, else README first 50 lines)
|
|
7
|
+
2. Relevant module (the folder containing the files being changed)
|
|
8
|
+
3. Specific files (only files directly referenced by the task)
|
|
9
|
+
4. Specific functions (patch-level — not entire files if only one function changes)
|
|
10
|
+
5. Solve
|
|
11
|
+
|
|
12
|
+
**Rules:**
|
|
13
|
+
- Never read entire repositories unless explicitly asked
|
|
14
|
+
- Never pre-load files "just in case" — wait until they are needed
|
|
15
|
+
- Never include node_modules, lockfiles, build outputs, or generated files
|
|
16
|
+
- Trim log files to: last error block + 10 lines of surrounding context
|
|
17
|
+
- For imports: only follow one hop (direct dependencies of changed file, not transitive)
|
|
18
|
+
- Reference line numbers instead of quoting unchanged code for context
|
|
19
|
+
|
|
20
|
+
**When you need more context:** state exactly what file and what section you need, and why.
|
|
21
|
+
Say "minimal context mode" to activate this skill.
|