The fix in 43a0dde introduces jq as a hard runtime dependency for the
session-start hook. jq is not preinstalled on every macOS or Linux setup,
so users without it would hit a cryptic failure on every new session.
Add a `command -v jq` guard that emits a valid INFO-priority JSON message
explaining the dependency and pointing at install commands. Skills remain
available individually — only the meta-skill injection is skipped.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fixes issue #89: session-start hook now properly escapes SKILL.md content
when constructing JSON output, preventing parse errors when markdown
contains quotes or control characters.
Uses jq -cn with --arg flag to properly escape all special characters
in the message field.
Drop the 24h TTL: HTTP validators are the whole freshness contract.
Key cache on URL alone; prompt-aware keying with normalization gave
false safety (semantic differences slipped through). Prompt is kept
as metadata and surfaced in the hit message so the next agent can
judge whether the earlier reading applies. Reframe docs around
"HTTP resource cache, not prompt cache".
While here, fix two latent bugs:
- Replace the unquoted heredoc in the pre-hook with printf. The
heredoc expanded $vars and backticks inside cached content, so a
compromised doc page could trigger command substitution on cache
hit.
- Strip CR before awk paragraph-mode parsing of curl -I -L output
so blank separators between response blocks on a redirect chain
are recognised (was silently picking intermediate headers).
Remove dead -v IGNORECASE=1 (gawk-only; tolower() already handles it).
Adds a pair of optional Claude Code hooks that cache WebFetch output
on disk but revalidate every reuse against the origin. Content is
served only when the server returns 304 Not Modified, so
source-driven-development's "verify against current docs" guarantee
still holds across sessions.
- hooks/sdd-cache-pre.sh: PreToolUse hook. For a cached entry, issues
a HEAD with If-None-Match / If-Modified-Since. On 304, blocks the
WebFetch (exit 2) and returns cached content via stderr; otherwise
allows the fetch through.
- hooks/sdd-cache-post.sh: PostToolUse hook. Captures response plus
current ETag / Last-Modified. Entries without a validator are
never stored — without one, the pre hook cannot verify freshness
and caching would amount to trusting memory.
- Cache key: sha256(url + normalized_prompt). Prompt is lowercased
and whitespace-collapsed so stylistic variants hit the same entry;
semantically different prompts still miss.
- Hard 24h TTL as a safety net against misbehaving origins.
- hooks/SDD-CACHE.md: opt-in setup, end-to-end testing, debugging.
- .gitignore: ignore the .claude/sdd-cache/ directory.
Hooks are opt-in: users register them in .claude/settings.json. The
source-driven-development skill itself is unchanged.
Enable this repo to work as a Claude Code plugin so users can
install it via `/plugin marketplace add addyosmani/agent-skills`.
Add:
- .claude-plugin/plugin.json — plugin manifest exposing
.claude/commands/ as namespaced slash commands under
the agent-skills: prefix
- .claude-plugin/marketplace.json — marketplace catalog
listing this repo as the agent-skills plugin
Fix:
- hooks/hooks.json — rewrite from deprecated flat-array format
to the plugin-system format keyed by event type; use
${CLAUDE_PLUGIN_ROOT} so the hook resolves correctly when the
plugin is installed from the marketplace into the local cache
- README — replace non-existent `claude plugin add` with the
correct `/plugin marketplace add` workflow; document namespaced
slash commands and --plugin-dir usage; add .claude-plugin/ to
the project tree
The repository was renamed from swe-skills to agent-skills but
internal references were never updated. This caused:
- session-start.sh to silently fail (path using-swe-skills/ did
not exist; the directory is using-agent-skills/)
- slash commands to invoke non-existent swe-skills: namespace
- docs and setup guides to point at the old clone URL
Rename all occurrences across 14 files: commands, CLAUDE.md,
README tree, docs/, and hooks/.