craft-project-audit

craft-project-audit is a skill for Claude Code from derjochenmeyer/claude-code-craft. It costs 79 tokens per session (4,992 once invoked), scanned A, original, MIT.

A quick local health check for a Claude Code project. It examines files, Git activity, hooks, decisions, memory, and project history without using research agents or external fetching.

In plain words
What is it for?
Checking project setup, stale files, hook behavior, decision records, memory usage, recent work, and when a future planning or “dream” review may be useful.
Why use it?
It gives a fast view of whether the project's working structure is complete and current. This helps decide whether a deeper audit is needed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; positional $N argument.

Good fit Checking project setup, stale files, hook behavior, decision records, memory usage, recent work, and when a future planning or “dream” review may be useful.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/derjochenmeyer/claude-code-craft/craft-project-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add derjochenmeyer/claude-code-craft --skill craft-project-audit
Clone the repo
git clone --depth 1 https://github.com/derjochenmeyer/claude-code-craft

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for craft-project-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/derjochenmeyer/claude-code-craft/craft-project-audit/github.svg)](https://agentmods.dev/skills/derjochenmeyer/claude-code-craft/craft-project-audit)
Your own site
<a href="https://agentmods.dev/skills/derjochenmeyer/claude-code-craft/craft-project-audit"><img src="https://agentmods.dev/badge/skills/derjochenmeyer/claude-code-craft/craft-project-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for craft-project-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/derjochenmeyer/claude-code-craft/craft-project-audit"><img src="https://agentmods.dev/badge/skills/derjochenmeyer/claude-code-craft/craft-project-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,992 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.04992
Opus 5.5 $0.00032 $0.01997
Sonnet 5.5 $0.00016 $0.00998
Haiku 4.5 $0.00008 $0.00499

Measured 1mo ago against content hash f3f5d02b1035, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

craft-project-audit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

CLAUDE_IMPORTS=$(grep -c "^@" CLAUDE.md 2>/dev/null || grep -c "^@" .claude/CLAUDE.md 2>/dev/null || true)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/craft-project-audit/SKILL.md · 395 lines

How it starts

The opening of the file, as written. The whole thing — 395 lines — stays where its author put it; the contents beside it link to each section on GitHub.

craft-project-audit

Fast health check. Tells you: is the structure complete? are the hooks functional? are the decisions well-formed? does the memory show adoption? when does the next dream make sense?

For deep analysis (feature adoption, session patterns, new releases): /craft-project-audit-full.


Step 1: Gather data

Run this entire block as one bash command:

CWD=$(pwd)
PROJECT_NAME=$(basename "$CWD")
NOW=$(date +%s)

# Git
LAST_COMMIT_TS=$(git log -1 --format="%ct" 2>/dev/null || echo "0")
LAST_COMMIT_REL=$(git log -1 --format="%cr" 2>/dev/null || echo "no commits")
COMMITS_30D=$(git log --since="30 days ago" --oneline 2>/dev/null | wc -l | tr -d ' ')
UNCOMMITTED=$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ')
BRANCH=$(git branch --show-current 2>/dev/null || echo "—")
HAS_GIT=false
git rev-parse --git-dir >/dev/null 2>&1 && HAS_GIT=true

# Portable age helpers
file_age() {
  local ts
  ts=$(stat -f "%m" "$1" 2>/dev/null || stat -c "%Y" "$1" 2>/dev/null)
  [[ -z "$ts" ]] && echo "missing" || echo $(( (NOW - ts) / 86400 ))
}
dir_birth() {
  local ts
  ts=$(stat -f "%B" "$1" 2>/dev/null || stat -c "%W" "$1" 2>/dev/null)
  [[ -z "$ts" || "$ts" == "0" || "$ts" == "-" ]] && echo "?" || echo $(( (NOW - ts) / 86400 ))
}

# --- Structure completeness ---
EXPECTED=(
  "CLAUDE.md"
  ".claude/settings.json"
  ".craft/PROJECT_STATE.md"
  ".craft/BACKLOG.md"
  ".craft/HANDOVER.md"
  ".craft/DECISIONS.md"
  ".craft/QUALITY.md"
  ".craft/memory/MEMORY_INDEX.md"
  ".craft/memory/learned-rules.md"
  ".craft/rules/coding.md"
)
MISSING_STRUCT=()
for p in "${EXPECTED[@]}"; do
  [[ ! -e "$p" ]] && MISSING_STRUCT+=("$p")
done
STRUCT_OK=$(( ${#EXPECTED[@]} - ${#MISSING_STRUCT[@]} ))
STRUCT_TOTAL=${#EXPECTED[@]}
CRAFT_AGE=$(dir_birth ".craft")

# --- Namespace purity: .craft/ must only contain craft-owned files ---
# Project work data (analyses, research, outputs) belongs in visible folders,
# never in .craft/. Flag anything that is not a known craft name.
CRAFT_WHITELIST="^(PROJECT_STATE\.md|BACKLOG\.md|HANDOVER\.md|DECISIONS\.md|DREAM_LOG\.md|QUALITY\.md|MEMORY_INDEX\.md|learned-rules\.md|rules|memory|dreams|archive|skills)$"
CRAFT_INTRUDERS=""
if [[ -d .craft ]]; then
  CRAFT_INTRUDERS=$(ls .craft/ 2>/dev/null | grep -vE "$CRAFT_WHITELIST" | head -10 | xargs)
fi

# --- File ages ---
STATE_AGE=$(file_age ".craft/PROJECT_STATE.md")
BACKLOG_AGE=$(file_age ".craft/BACKLOG.md")
HANDOVER_AGE=$(file_age ".craft/HANDOVER.md")
DECISIONS_AGE=$(file_age ".craft/DECISIONS.md")
CLAUDE_AGE=$(file_age "CLAUDE.md")
[[ "$CLAUDE_AGE" == "missing" ]] && CLAUDE_AGE=$(file_age ".claude/CLAUDE.md")

# --- CLAUDE.md content ---
CLAUDE_LINES=$(wc -l < CLAUDE.md 2>/dev/null || wc -l < .claude/CLAUDE.md 2>/dev/null || echo "0")
CLAUDE_LINES=$(echo "$CLAUDE_LINES" | tr -d ' ')
CLAUDE_IMPORTS=$(grep -c "^@" CLAUDE.md 2>/dev/null || grep -c "^@" .claude/CLAUDE.md 2>/dev/null || true)
CLAUDE_IMPORTS=${CLAUDE_IMPORTS:-0}
RULES_COUNT=$(ls .craft/rules/ 2>/dev/null | wc -l | tr -d ' ')
CLAUDE_WHY=$(grep -cE "\b(because|reason|why|—|->|so that)\b" CLAUDE.md 2>/dev/null || true)
CLAUDE_WHY=${CLAUDE_WHY:-0}
CLAUDE_RULES=$(grep -cE "^[-*]|^[0-9]+\." CLAUDE.md 2>/dev/null || true)
CLAUDE_RULES=${CLAUDE_RULES:-1}
[[ "$CLAUDE_RULES" == "0" ]] && CLAUDE_RULES=1
WHY_RATIO=$(( CLAUDE_WHY * 100 / (CLAUDE_RULES > 0 ? CLAUDE_RULES : 1) ))

# --- Backlog ---
BACKLOG_OPEN=$(grep -c "^- \[ \]" .craft/BACKLOG.md 2>/dev/null || true)
BACKLOG_OPEN=${BACKLOG_OPEN:-0}
BACKLOG_DONE=$(grep -c "^- \[x\]" .craft/BACKLOG.md 2>/dev/null || true)
BACKLOG_DONE=${BACKLOG_DONE:-0}

# --- Staleness: commits + file-changes since each marker file's mtime ---
changes_since() {
  local target="$1"
  [[ ! -f "$target" ]] && { echo "0|0"; return; }
  local mtime
  mtime=$(stat -f "%m" "$target" 2>/dev/null || stat -c "%Y" "$target" 2>/dev/null || echo 0)
  local commits=0 files=0
  if $HAS_GIT; then
    commits=$(git log --since="@$mtime" --oneline 2>/dev/null | wc -l | tr -d ' ')
  fi
  files=$(find . -maxdepth 3 -type f -newer "$target" \
    -not -path "./.craft/*" -not -path "./.git/*" \
    -not -path "./node_modules/*" -not -path "./dist/*" -not -path "./build/*" \
    -not -path "./.next/*" -not -path "./.astro/*" -not -path "./vendor/*" \
    -not -path "./__pycache__/*" -not -path "./.venv/*" -not -path "./venv/*" \
    2>/dev/null | wc -l | tr -d ' ')
  echo "${commits}|${files}"
}
STATE_ACTIVITY=$(changes_since ".craft/PROJECT_STATE.md")
BACKLOG_ACTIVITY=$(changes_since ".craft/BACKLOG.md")
HANDOVER_ACTIVITY=$(changes_since ".craft/HANDOVER.md")

# --- Dream history ---
DREAM_COUNT=0
LAST_DREAM_AGE="never"
if [[ -d .craft/dreams ]]; then
  DREAM_COUNT=$(ls .craft/dreams/ 2>/dev/null | wc -l | tr -d ' ')
  if [[ $DREAM_COUNT -gt 0 ]]; then
    LAST_DREAM=$(ls -t .craft/dreams/ 2>/dev/null | head -1)
    [[ -n "$LAST_DREAM" ]] && LAST_DREAM_AGE=$(file_age ".craft/dreams/$LAST_DREAM")
  fi
fi

# --- Memory adoption (defaults vs custom entries) ---
MEMORY_FILES=$(ls .craft/memory/ 2>/dev/null | wc -l | tr -d ' ')
MEM_DEFAULTS=$(ls .craft/memory/ 2>/dev/null | grep -cE "^(MEMORY_INDEX\.md|learned-rules\.md|archive)$" || true)
MEM_DEFAULTS=${MEM_DEFAULTS:-0}
MEM_CUSTOM=$(( MEMORY_FILES - MEM_DEFAULTS ))
(( MEM_CUSTOM < 0 )) && MEM_CUSTOM=0

# --- DECISIONS format ---
DEC_ENTRIES=0
DEC_WELLFORMED=0
if [[ -f .craft/DECISIONS.md ]]; then
  DEC_ENTRIES=$(grep -c "^## D[0-9]" .craft/DECISIONS.md 2>/dev/null || true)
  DEC_ENTRIES=${DEC_ENTRIES:-0}
  DEC_WELLFORMED=$(awk '
    /^## D[0-9]/ {if (in_e && date && decision && why && apply) count++; in_e=1; date=0; decision=0; why=0; apply=0; next}
    in_e && /^\*\*Date:\*\*/ {date=1}
    in_e && /^\*\*Decision:\*\*/ {decision=1}
    in_e && /^\*\*Why:\*\*/ {why=1}
    in_e && /^\*\*How to apply:\*\*/ {apply=1}
    END {if (in_e && date && decision && why && apply) count++; print count+0}
  ' .craft/DECISIONS.md 2>/dev/null)
fi

# --- Hook functionality ---
HOOK_JSON_VALID="n/a"
HOOK_EXEC_STATUS="n/a"
HOOK_COUNT=0
HOOK_FAILURES=()
if [[ -f .claude/settings.json ]]; then
  if jq empty .claude/settings.json 2>/dev/null; then
    HOOK_JSON_VALID="yes"
    HOOK_COUNT=$(jq '[.hooks // {} | to_entries[] | .value[]? | .hooks[]?] | length' .claude/settings.json 2>/dev/null)
    HOOK_EXEC_STATUS="ok"
    while IFS= read -r cmd; do
      [[ -z "$cmd" || "$cmd" == "null" ]] && continue
      output=$(bash -c "$cmd" 2>&1)
      # Valid: empty output, or output that parses as JSON
      if [[ -n "$output" ]] && ! echo "$output" | jq empty 2>/dev/null; then
        HOOK_EXEC_STATUS="fail"
        HOOK_FAILURES+=("${cmd:0:60}...")
      fi
    done < <(jq -r '.hooks // {} | to_entries[] | .value[]? | .hooks[]? | .command' .claude/settings.json 2>/dev/null)
  else
    HOOK_JSON_VALID="no"
    HOOK_EXEC_STATUS="skipped"
  fi
fi

# --- Global settings (user-level) ---
EFFORT=$(jq -r '.effortLevel // "not set"' ~/.claude/settings.json 2>/dev/null || echo "not set")
STATUSLINE=$(jq -r 'if .statusLine.command then "configured" else "not set" end' ~/.claude/settings.json 2>/dev/null || echo "not set")
HOOK_EVENTS=$(jq -r '.hooks // {} | keys | join(", ")' ~/.claude/settings.json 2>/dev/null || echo "none")

# --- Craft skills installed ---
# Array syntax used intentionally — zsh does not word-split unquoted
# strings in `for s in $VAR`, so the string form loops only once.
CRAFT_SKILLS_LIST=(
  craft-project-setup craft-project-status craft-project-audit
  craft-project-audit-full craft-project-dream craft-project-explore
  craft-global-audit craft-session-solidify craft-update-self craft-project-remember
)
MISSING_SKILLS=""
for s in "${CRAFT_SKILLS_LIST[@]}"; do
  [[ ! -d "$HOME/.claude/skills/$s" ]] && MISSING_SKILLS="$MISSING_SKILLS $s"
done
MISSING_SKILLS=$(echo "$MISSING_SKILLS" | xargs)

echo "=== DATA ==="
echo "PROJECT=$PROJECT_NAME BRANCH=$BRANCH COMMITS_30D=$COMMITS_30D HAS_GIT=$HAS_GIT"
echo "LAST_COMMIT=$LAST_COMMIT_REL LAST_COMMIT_TS=$LAST_COMMIT_TS UNCOMMITTED=$UNCOMMITTED"
echo "STRUCT_OK=$STRUCT_OK STRUCT_TOTAL=$STRUCT_TOTAL MISSING_STRUCT=${MISSING_STRUCT[*]}"
echo "CRAFT_AGE=$CRAFT_AGE"
echo "CRAFT_INTRUDERS=$CRAFT_INTRUDERS"
echo "STATE_AGE=$STATE_AGE BACKLOG_AGE=$BACKLOG_AGE HANDOVER_AGE=$HANDOVER_AGE DECISIONS_AGE=$DECISIONS_AGE CLAUDE_AGE=$CLAUDE_AGE"
echo "CLAUDE_LINES=$CLAUDE_LINES CLAUDE_IMPORTS=$CLAUDE_IMPORTS RULES_COUNT=$RULES_COUNT WHY_RATIO=$WHY_RATIO%"
echo "BACKLOG_OPEN=$BACKLOG_OPEN BACKLOG_DONE=$BACKLOG_DONE"
echo "STATE_ACTIVITY=$STATE_ACTIVITY BACKLOG_ACTIVITY=$BACKLOG_ACTIVITY HANDOVER_ACTIVITY=$HANDOVER_ACTIVITY"
echo "DREAM_COUNT=$DREAM_COUNT LAST_DREAM_AGE=$LAST_DREAM_AGE"
echo "MEMORY_FILES=$MEMORY_FILES MEM_CUSTOM=$MEM_CUSTOM"
echo "DEC_ENTRIES=$DEC_ENTRIES DEC_WELLFORMED=$DEC_WELLFORMED"
echo "HOOK_JSON_VALID=$HOOK_JSON_VALID HOOK_EXEC_STATUS=$HOOK_EXEC_STATUS HOOK_COUNT=$HOOK_COUNT HOOK_FAILURES=${HOOK_FAILURES[*]}"
echo "EFFORT=$EFFORT STATUSLINE=$STATUSLINE HOOK_EVENTS=$HOOK_EVENTS"
echo "MISSING_SKILLS=$MISSING_SKILLS"

Read the full file on GitHub · 395 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 395 lines · 79 tokens per session scan A f3f5d02b1035

Subscribe to this mod's changes

craft-project-audit is a skill published in the GitHub repository derjochenmeyer/claude-code-craft (2 stars, last pushed 6mo ago), licensed MIT. It adds 79 tokens to every session and 4,992 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

cwv-optimizer

Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…

adobe/skills · 112 tokens

incident-response-incident-response

Coordinate production incident triage, mitigation, investigation, recovery, and follow-up. Use when responding to outages or other incidents that require structured operational coordination.

rmyndharis/antigravity-skills · 36 tokens

ci-fixer

CI failures - read error, minimal fix, verify.

sipyourdrink-ltd/bernstein · 15 tokens