demock-guard
Skill4 starsChanged 31 days agoMITView on GitHub
Detect and eliminate test doubles on production paths, silent dummy fallbacks (e.g. SQLite fallbacks in Supabase apps), fail-open authorization gates, and placeholder stubs.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- anti-slop-engineeringSkill
- anti-slop-engineeringSkill
- api-ergonomics-and-contract-governorSkill
- apple-craft-and-frame-budgetSkill
- apple-craft-and-interaction-physicsSkill
- asset-provenance-guardSkill
- backprop-guardSkill
- chaos-and-degradation-choreographerSkill
- chromatic-drift-guardSkill
- cognitive-load-and-attention-governorSkill
- comment-budget-guardSkill
- context-window-and-token-economics-architectSkill
- cryptographic-agility-and-secret-lifecycle-gateSkill
- decision-guardSkill
- design-system-drift-guardSkill
- deterministic-simulation-and-property-testingSkill
- distributed-consensus-and-concurrency-gateSkill
- finops-and-unit-economics-governorSkill
- future-scale-gateSkill
- grumpy-senior-staff-engineerSkill
- honeypot-trap-guardSkill
- house-tell-guardSkill
- install-anti-slopSkill
- llm-eval-and-prompt-injection-fortressSkill
- mandela-guardSkill
- mechanical-sympathy-and-perf-gateSkill
- mechanical-sympathy-profilerSkill
- motion-runtime-guardSkill
- observability-and-slo-architectSkill
- observability-and-slo-gateSkill
- paranoid-principal-architectSkill
- pr-boundary-guardSkill
- privacy-and-data-lineage-gateSkill
- re0-handoff-guardSkill
- reduction-guardSkill
- repo-memory-and-invariant-stewardSkill
- root-fix-gateSkill
- safe-evolution-and-rollout-choreographerSkill
- scientific-fault-isolationSkill
- styleseed-guardSkill
- supply-chain-and-sbom-sentinelSkill
- tagore-guardSkill
- type-level-and-ast-slop-gateSkill
- ui-and-copy-disciplineSkill
- verification-oracle-architectSkill
- zero-downtime-migration-gateSkill
The file
Files
Demock & Silent-Fallback Guard
Eliminate phantom mocks on live paths, silent exception swallowing with dummy data, and fake persistence fallbacks.
Why This Skill Is Needed & Target State
AI code generators often insert silent fallbacks to make a broken system appear to work:
- Falling back to local SQLite or in-memory dictionaries when a database connection fails (hiding outages and creating data split-brain).
- Catch blocks that swallow exceptions and return dummy empty arrays or mock objects (
catch { return [{ id: 1, name: "Sample" }]; }). - Instantiating
Mock*orFake*doubles in non-test runtime modules. - Security/auth checks that return
truewhen credentials or tokens are missing.
The target state is fail-closed, honest engineering: production paths either execute their real dependencies or surface explicit, actionable failures with exact RFC 9457 error contracts.
Invariant Rules
- Fail-Closed by Default: External dependency outages must never be silently masked with dummy fallback objects. Fail closed or degrade gracefully with visible caller-facing status.
- Zero Test Doubles in Runtime:
Mock*,MagicMock,Fake*, and test framework doubles are strictly banned in production files. - No Auth Bypass: Missing credentials must return 401/403 or throw
AuthenticationError, never returntrue.
CLI Usage
# Scan git diff against base commit
bunx anti-slop-engineering demock --base HEAD
# Scan specific files or directories with JSON output
bunx anti-slop-engineering demock src/ --json --strictDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

