.claude/skills/joycraft-lockdown/SKILL.md
Generate constrained execution boundaries for an implementation session -- NEVER rules and deny patterns to prevent agent overreach
npx skillsauth add maksutovic/joycraft joycraft-lockdownInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The user wants to constrain agent behavior for an implementation session. Your job is to interview them about what should be off-limits, then generate CLAUDE.md NEVER rules and .claude/settings.json deny patterns they can review and apply.
Lockdown is most valuable for:
For simple feature work on a well-tested codebase, lockdown is usually overkill. Mention this context to the user so they can decide.
Before starting the interview, check if the project has test files or directories (look for tests/, test/, __tests__/, spec/, or files matching *.test.*, *.spec.*).
If no tests are found, tell the user:
Lockdown mode is most useful when you already have tests in place -- it prevents the agent from modifying them while constraining behavior to writing code and running tests. Consider running
/joycraft-new-featurefirst to set up a test-driven workflow, then come back to lock it down.
If the user wants to proceed anyway, continue with the interview.
Ask these three questions, one at a time. Wait for the user's response before proceeding to the next question.
What test files or directories should be off-limits for editing? (e.g.,
tests/,__tests__/,spec/, specific test files)I'll generate NEVER rules to prevent editing these.
If the user isn't sure, suggest the test directories you found in Step 1.
What commands should the agent be allowed to run? Defaults:
- Write and edit source code files
- Run the project's smoke test command
- Run the full test suite
Any other commands to explicitly allow? Or should I restrict to just these?
What commands should be denied? Defaults:
- Package installs (
npm install,pip install,cargo add,go get, etc.)- Network tools (
curl,wget,ping,ssh)- Direct log file reading
Any specific commands to add or remove from this list?
Edge case -- user wants to allow some network access: If the user mentions API tests or specific endpoints that need network access, exclude those from the deny list and note the exception in the output.
Edge case -- user wants to lock down file writes: If the user wants to prevent ALL file writes, warn them:
Denying all file writes would prevent the agent from doing any work. I recommend keeping source code writes allowed and only locking down test files, config files, or other sensitive directories.
Based on the interview responses, generate output in this exact format:
## Lockdown boundaries generated
Review these suggestions and add them to your project:
### CLAUDE.md -- add to NEVER section:
- Edit any file in `[user's test directories]`
- Run `[denied package manager commands]`
- Use `[denied network tools]`
- Read log files directly -- interact with logs only through test assertions
- [Any additional NEVER rules based on user responses]
### .claude/settings.json -- suggested deny patterns:
Add these to the `permissions.deny` array:
["[command1]", "[command2]", "[command3]"]
---
Copy these into your project manually, or tell me to apply them now (I'll show you the exact changes for approval first).
Adjust the content based on the actual interview responses:
After generating the boundaries above, also recommend a Claude Code permission mode. Include this section in your output:
### Recommended Permission Mode
You don't need `--dangerously-skip-permissions`. Safer alternatives exist:
| Your situation | Use | Why |
|---|---|---|
| Autonomous spec execution | `--permission-mode dontAsk` + allowlist above | Only pre-approved commands run |
| Long session with some trust | `--permission-mode auto` | Safety classifier reviews each action |
| Interactive development | `--permission-mode acceptEdits` | Auto-approves file edits, prompts for commands |
**For lockdown mode, we recommend `--permission-mode dontAsk`** combined with the deny patterns above. This gives you full autonomy for allowed operations while blocking everything else -- no classifier overhead, no prompts, and no safety bypass.
`--dangerously-skip-permissions` disables ALL safety checks. The modes above give you autonomy without removing the guardrails.
If the user asks you to apply the changes:
.claude/settings.json, show the user what the permissions.deny array will look like after adding the new patterns. Ask for confirmation before writing.Never auto-apply. Always show the exact changes and wait for explicit approval.
development
Spawn an independent verifier subagent to check an implementation against its spec -- read-only, no code edits, structured pass/fail verdict
development
Assess and upgrade your project's AI development harness — score 7 dimensions, apply fixes, show path to Level 5
testing
Wrap up a session — capture discoveries, verify, prepare for PR or next session
development
Produce objective codebase research by isolating question generation from fact-gathering — subagent sees only questions, never the brief