claude-dev-env 1.43.0 → 1.44.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "1.43.0",
3
+ "version": "1.44.0",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: pre-compact
3
+ description: >-
4
+ Composes a focus directive for `/compact [instructions]` and copies the full
5
+ `/compact <directive>` string to the operator's clipboard so the next prompt
6
+ is a single paste. The directive pins the session's load-bearing identifiers
7
+ (branch, PR, HEAD, worktree, in-flight work, decisions, blockers, files in
8
+ play, follow-ups) and lists the redundant tool outputs the summarizer should
9
+ drop. Use when the user says `/pre-compact`, asks to prep for compaction, or
10
+ asks to compose a focus directive for `/compact`.
11
+ disable-model-invocation: true
12
+ ---
13
+
14
+ # Pre-Compact
15
+
16
+ `/compact [instructions]` accepts a focus directive that steers the
17
+ compaction-summary LLM toward high-signal content. This skill writes that
18
+ directive from the live session and copies the full `/compact <directive>`
19
+ string to the operator's clipboard.
20
+
21
+ **Announce at start:** "I'm composing your compact focus directive."
22
+
23
+ ## Step 1 — Read the live session
24
+
25
+ Pull the load-bearing identifiers from the current conversation. Run
26
+ `git status`, `git rev-parse --short HEAD`, or `gh pr view` when values are
27
+ not already in context.
28
+
29
+ | Field | What to capture | Source |
30
+ |---|---|---|
31
+ | `branch` | Active branch name | `git branch --show-current` |
32
+ | `pr` | Active PR number, when one exists | `gh pr view --json number` |
33
+ | `head` | Short HEAD SHA (whatever `git rev-parse --short` outputs) | `git rev-parse --short HEAD` |
34
+ | `worktree` | Absolute path to the working directory | `pwd` |
35
+ | `in_flight` | One sentence describing what is being worked on right now | conversation |
36
+ | `decisions` | Architectural choices, library picks, tradeoffs settled this session | conversation |
37
+ | `blockers` | Failures observed, root causes identified, fixes pending | conversation |
38
+ | `files` | Paths the operator is iterating on (edited or read more than once) | conversation |
39
+ | `follow_ups` | What the user asked to be remembered or revisited | conversation |
40
+
41
+ A field whose value cannot be stated as a concrete identifier is omitted
42
+ from the directive.
43
+
44
+ ## Step 2 — Render the directive
45
+
46
+ Render this exact shape, populating only the fields with concrete values:
47
+
48
+ ```
49
+ Preserve:
50
+ - Branch: <name>
51
+ - PR: #<number>
52
+ - HEAD: <short-sha>
53
+ - Worktree: <path>
54
+ - In-flight: <one sentence>
55
+ - Decisions: <bullet per decision>
56
+ - Blockers: <bullet per blocker>
57
+ - Files: <path>, <path>, <path>
58
+ - Follow-ups: <bullet per follow-up>
59
+
60
+ Drop:
61
+ - Tool outputs already applied to files
62
+ - Per-tick progress narration
63
+ - Resolved findings and superseded SHAs
64
+ - Listing/grep output whose conclusion appears above
65
+ ```
66
+
67
+ The `Preserve:` block leads so the summarizer maximizes recall first. The
68
+ `Drop:` block lists the lightest-touch removals — raw tool outputs are the
69
+ safest content to drop because the work they produced lives in the files
70
+ and commits.
71
+
72
+ Source: [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
73
+ — "start by maximizing recall to ensure your compaction prompt captures
74
+ every relevant piece of information from the trace, then iterate to improve
75
+ precision by eliminating superfluous content."
76
+
77
+ ## Step 3 — Copy `/compact <directive>` to the clipboard
78
+
79
+ Write the full `/compact <directive>` string to a temporary file via the
80
+ Write tool, then copy the file contents to the clipboard with PowerShell:
81
+
82
+ ```
83
+ pwsh -NoProfile -Command "Get-Content -LiteralPath '<temp file path>' -Raw | Set-Clipboard"
84
+ ```
85
+
86
+ `Get-Content -LiteralPath … -Raw` reads the file as a single string with
87
+ no wildcard expansion, and `Set-Clipboard` writes it verbatim. The intermediate file keeps the directive content out
88
+ of any shell-parsing path: session text passes through `Get-Content`
89
+ unmodified regardless of which characters it contains.
90
+
91
+ A reasonable temp path under `$env:TEMP` (Windows) or `$TMPDIR` (POSIX)
92
+ works; clean it up after the `Set-Clipboard` call returns.
93
+
94
+ ## Step 4 — Hand off
95
+
96
+ Print this confirmation line to the operator:
97
+
98
+ > Copied `/compact …` to your clipboard. Paste it as your next prompt to
99
+ > compact this conversation with focus.
100
+
101
+ Then list up to the first three `Preserve:` bullets (or fewer when the
102
+ directive omits fields) and the first `Drop:` bullet inline so the
103
+ operator can spot-check before pasting.
104
+
105
+ ---
106
+
107
+ ## References
108
+
109
+ - `/compact [instructions]` — [Claude Code commands](https://code.claude.com/docs/en/commands)
110
+ - Compaction strategy — [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
111
+
112
+ ## Folder map
113
+
114
+ - `SKILL.md` — hub. No companions.