Spaces:
Sleeping
Download CLAUDE.md from DecodeMarketing/decode_tools: direct link, hf CLI and curl.
- Browser
- Download file 6.08 kB
-
https://huggingface.co/spaces/DecodeMarketing/decode_tools/resolve/main/CLAUDE.md
- Command line
-
hf download hf://spaces/DecodeMarketing/decode_tools/CLAUDE.md
-
curl -L -o CLAUDE.md https://huggingface.co/spaces/DecodeMarketing/decode_tools/resolve/main/CLAUDE.md
A newer version of the Streamlit SDK is available: 1.67.0
CLAUDE.md
Session-start: ensure required plugins are installed
At the start of any new session in this repo, run /plugin marketplace list. If claude-plugins-official is not listed, install the four required plugins:
/plugin marketplace add anthropics/claude-plugins-official
/plugin install feature-dev@claude-plugins-official
/plugin install code-simplifier@claude-plugins-official
/plugin install claude-md-management@claude-plugins-official
/plugin install superpowers@claude-plugins-official
One-time per user per machine. feature-dev provides the code-reviewer subagent referenced by the reviewer procedure (and code-architect for plan review). Without feature-dev installed, every commit touching source code will be blocked by the commit-msg gate.
Subsequent sessions refresh plugins automatically.
Reviewer procedure
Triggered by the Stop hook when the session modified substantive files and no fresh .decode-reviewer-clean marker exists. The Stop hook blocks session end and points the model back to this procedure. Steps, in order:
- Run
git diff HEADvia Bash. - Dispatch
feature-dev:code-reviewervia the Agent tool. Pass the diff as context. Instruct: review only the changes, target latency under 90 seconds, report only blocking issues (confidence ≥ 80). - When the reviewer returns:
- No blocking issues → compute
HEAD_SHA=$(git rev-parse HEAD)andDIFF_HASH=$(bash scripts/reviewer-hash.sh), then Write.decode-reviewer-cleanwith exactly one line:<HEAD-SHA> <DIFF-HASH> <ISO-8601-UTC-timestamp>. The hash helper covers tracked-file diffs AND untracked file contents; do not substitute a plaingit diff | git hash-objectpipe — it misses untracked files and lets create-file → pass-review → silent-edit bypass the marker. - Blocking issues → Write
.decode-reviewer-findings.mdwith the list. Do NOT write.decode-reviewer-clean.
- No blocking issues → compute
- Return.
If the feature-dev plugin is not installed, stop and ask the user to run /plugin install feature-dev@claude-plugins-official.
The commit-msg git hook blocks commits unless the marker's HEAD and DIFF hashes both match the current repo state, or the commit message contains [override-reviewer: <reason>]. Binding to the diff content means any edit made after review invalidates the marker. Overrides are visible forever in git log --grep="override-reviewer".
DECODE base rules
This repo enforces DECODE's Claude Code standards. The full rule catalog lives at https://github.com/implicitdiagnosticsandsolutions/decode-claude-wiki/tree/main/docs/rules — rules are loaded by reference.
The short version — what you must follow:
Reviewer subagent required before commit. For any change that touches source code, generator scripts, or data outputs, dispatch the
feature-dev:code-reviewersubagent before committing. The Stop hook blocks session end until this procedure is handled. Committing without a fresh.decode-reviewer-cleanmarker is blocked by.githooks/commit-msgunless the commit message contains[override-reviewer: <reason>]. Overrides are visible forever ingit log --grep="override-reviewer".Verify before claiming. Before saying "X works", "it's documented", or "it's in memory", run a concrete check. Paste the output. "Should" is a red flag — replace it with a check.
Patch the source, not the generated artifact. If a file under
output/ordist/was produced by a script, edit the script and regenerate. Never edit the artifact directly.Stage files explicitly. Never
git add -Aorgit add .. Name each file.No AI attribution in commits. Conventional format, human author.
Optional final cleanup
This template also ships a repo-local deslop skill under .claude/skills/deslop/.
Use it after a change already works and before commit when you want a final pass focused on:
- removing unnecessary wrappers or indirection
- preserving source-of-truth files and types
- catching debug leftovers and placeholder comments
- reducing AI slop without widening scope
deslop is advisory, not a hard gate.
First-time setup in this repo
Setup runs automatically on Claude Code session start via the ensure-setup.sh SessionStart hook — it wires .githooks into git (core.hooksPath) so the commit-msg and pre-commit gates fire. Idempotent; no-ops once wired.
If you commit from a plain terminal in a fresh clone without ever opening a Claude Code session, the hooks will not fire until you run setup manually:
bash scripts/setup.sh
Destructive operations
Destructive git operations (push --force, reset --hard, clean -f, branch -D, etc.) are blocked by the block-dangerous-git.sh PreToolUse hook. If you genuinely need one, ask the user to run it manually after explicit chat confirmation.
Writes to .env*, credentials*, *.pem, *.key, and other secret files are blocked by block-env-writes.sh.
This repo
icat_app ist eine Streamlit-Webanwendung mit 8 Tools für Brand Asset Management bei DECODE. Sie läuft auf Hugging Face Spaces (Python 3.12, Streamlit 1.32.2).
Lokal starten:
pip install -r requirements.txt
streamlit run app.py
# öffnet http://localhost:8501
Source-Layout:
app.py— Entry Point, konfiguriert die Seite und bindet alle Tabs eintab1.py–tab8.py— je ein Tool (ein Tab = eine Datei)helper.py— geteilte Hilfsfunktionenrequirements.txt— Python-Abhängigkeiten (Quelle der Wahrheit für Dependencies)
Die 8 Tools:
- Extract Images from Excel
- Name Assets by Brand
- Canvas White to Transparent
- Asset Overview (PDF)
- Name Stims by Block
- Re-run Matrix
- Resize
- Place on Canvas
Repo-spezifische Regeln:
- Jeder Tab hat seine eigene Datei (
tab1.py–tab8.py) — neue Tools als neue Tab-Datei anlegen, nicht inapp.pyeinbauen. - Die App deployed automatisch auf Hugging Face Spaces bei Push auf
main.