Chalk Labs
Need help deploying anti-bug-prevention?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/signalo-rust-anti-bug-prevention
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, testing, devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
anti-bug-prevention- Description
- Production deploy safety pipeline. Six patterns for catching production failures before they ship — re-review your own fixes, an anti-bug catalogue at design phase, atomic days vs safe rollback points, surprise zones with ENV fallbacks, idempotent SQL migrations by default, and excluding test files from the production tsconfig. Applies to any multi-day sprint, any migration, any change with tests.
- License
- MIT
- Instructions
- 156 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Anti-bug prevention pipeline
> Sanitized example skill. Each pattern below cost a real production incident or a near-miss.
Apply this on any change larger than a single working day — not "when I remember."
## Pattern 1 — Re-review your own fixes is a separate step
**Problem:** "Fixed per review" ≠ "Reviewed." Your own fixes can contain fresh bugs. In one real case, review round 1 found 6 blockers; after applying the fixes, round 2 (same reviewers, focused on the fixes) found **2 more CRITICAL + 4 HIGH — inside the fixes**. Deploying after round 1 would have been a production failure.
**Rule:**
1. Round 1 review (type reviewer / DB reviewer / QA / prompt engineer)
2. Apply fixes
3. **Round 2 review** — same agents, explicit focus "check my fixes"
4. Only after round 2 — deploy
**When mandatory:**
- Any review found ≥ 2 CRITICAL/HIGH blockers → re-review required
- Migration / DB schema / threading-related fixes → re-review even on 1 blocker
- Multi-agent review (3+ agents found different things) → re-review required — fixes can conflict with each other
**Anti-pattern:** "typecheck green after my fixes = ready to deploy." Typecheck catches syntax, not semantics. Re-review catches semantics.
## Pattern 2 — Anti-bug catalogue at design phase, not in code
**Problem:** "Tests will catch bugs" — no. Tests catch what you predicted. Categories of bugs you didn't foresee are the mine under the floor.
**Rule:** before writing code, ask a design agent (architect / board) an explicit question: "find 10 potential bugs in this plan." Each bug → assigned to a specific sprint day + a defensive recipe in code from day one.
**Template:**
```
| # | Bug | Mitigation |
|---|---|---|
| B1 | CVPixelBuffer use-after-free (Vision async) | Day 2: pixelBuffer.deepCopy(via: pool) as the first line |
| B2 | Priority inversion: audio thread waits on vision queue lock | Day 3: os_unfair_lock_trylock or an SPSC ring-buffer |
| ... | ... | ... |
```
**When mandatory:**
- Sprint > 3 days
- Touches threading / memory ownership / IPC / migrations
- Extends a hot-path module (audio engine, video encoder, ML inference)
**Anti-pattern:** "we'll solve it if it comes up." In production "comes up" = an incident with an emergency hotfix.
## Pattern 3 — Quality gates between days: atomic vs safe-rollback
**Problem:** "On day 5 something broke" in a sprint without gates = roll back all 5 days at once. An atomic block for days 1-4 plus safe stops after days 5/7 gives you two rollback points instead of one all-or-nothing.
**Rule:** for a sprint > 5 days:
1. **Atomic block** — a sequence of days that CANNOT be stopped mid-way. Usually: DB migration + code-wide rename + critical refactor. If you stop, old code + new DB = production crash.
2. **Safe rollback points** — points where you can stop the sprint and ship a smaller version. Usually: after Phase A (without Phase B), after core-feature (without UI polish).
3. **Quality gate after each day** — a specific grep / SQL / unit-test that is green and BLOCKS the start of the next day.
**Template:**
```
| Day | Quality gate (blocker for next day) | Checkpoint |
|---|---|---|
| 1 | grep "OldTableName" = 0 matches in src/, integration test green | — |
| 2 | unit tests green + audio invariant manual check | — |
| 3 | AudioMixerNoObserverTest green (regression FIRST) | ⚠️ checkpoint #1 |
```
**Anti-pattern:** "we'll check everything on day 10." By day 10 it's unclear when what broke. Gates localize it.
## Pattern 4 — Surprise zones with ENV fallbacks
**Problem:** confidence in new patterns is rarely 100%. Active-speaker-detection accuracy may be 70% on your data instead of 85% in the research paper. Without a fallback = redeploy.
**Rule:** every zone of uncertainty (new ML threshold, performance assumption, third-party API behavior) → an ENV switch in code from day one. Default = your hypothesis. If there's a problem — `ENV=value` in one minute, no redeploy.
**Template:**
```
- ACTIVE_SPEAKER_HEURISTIC_DISABLED=true → fall back to a simple rule
- SCREEN_FACE_MATCH_THRESHOLD=0.92 → tune threshold for screen
- VOICE_MATCH_THRESHOLD=0.85 → tune voice threshold
- FUSION_FEATURE_ENABLED=false → kill-switch the whole feature without a code rollback
```
**Document in the sprint file** under a "Surprise zones" section — which zones, which ENV for each, and the trigger to activate it (e.g. "if accuracy < 70% on the first 5 records").
**Anti-pattern:** hardcoded magic numbers. In production you'll learn that 0.7 is too high / too low — and have nothing to tune.
## Pattern 5 — Idempotent SQL migrations = default
**Problem:** a hotfix once exposed two historical migrations that fail on a clean DB (`column "isPersonal" does not exist`, `relation "MediaAsset" does not exist`). Cause: `prisma db push` created columns/tables without migrations; it survived on prod but failed on a fresh dev/staging DB.
**Rule:** all DDL operations are idempotent by default.
```sql
-- ALWAYS:
ALTER TABLE "X" ADD COLUMN IF NOT EXISTS "y" TEXT;
CREATE TABLE IF NOT EXISTS "Z" (...);
CREATE INDEX IF NOT EXISTS "X_idx" ON "X"(...);
-- FK constraints via DO-block (no native IF NOT EXISTS):
DO $$ BEGIN
ALTER TABLE "X" ADD CONSTRAINT "X_y_fkey" FOREIGN KEY ...;
EXCEPTION WHEN duplicate_object THEN NULL; END $$;
```
**Cost on prod:** zero (no-op if it already exists).
**Benefit on dev/staging:** works from any DB snapshot, safe to re-run.
**Anti-pattern:** `ALTER TABLE x ADD COLUMN y` without `IF NOT EXISTS`. It passes once; the second time = `column already exists` → migration failed, and downstream migrations too.
## Pattern 6 — Test files → exclude from production tsconfig
**Problem:** a production build once failed on the deploy host with `Cannot find module 'vitest'` from `src/foo.test.ts`. Cause: the host doesn't install devDependencies, `tsc` tries to compile ALL `.ts` under src/ including tests, and vitest is unresolved.
**Rule:** in every `tsconfig.json` that compiles for production:
```json
{
"include": ["src/**/*.ts"],
"exclude": ["src/**/*.test.ts", "src/**/*.integration.test.ts"]
}From signalo-rust/ai-guardrails, MIT.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 11, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/signalo-rust/ai-guardrails
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from signalo-rust
- 0.497score
anti-bug-prevention
signalo-rust
Production deploy safety pipeline.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
brainstorm-first
signalo-rust
Before starting any non-trivial task (>0.5 day, new feature, new UI page, new integration, refactor spanning >5 files), it is mandatory to ask the requester…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
api-contract-audit
signalo-rust
Inventory every API endpoint that surfaces a field to clients BEFORE dropping, renaming, or semantically changing it.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
content-hash-cache-pattern
signalo-rust
Cache expensive file processing results via SHA-256 content hashes — path-independent, auto-invalidating, service layer separation.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docker-push-verify
signalo-rust
After `docker buildx build --push`, always verify the image actually landed on the upstream registry.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
eval-harness
signalo-rust
Formal eval-driven development (EDD) framework.
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get anti-bug-prevention running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
anti-bug-prevention skill. Agent Mart. https://agentmart.dev/skills/signalo-rust-anti-bug-prevention (last updated 2026-10-24)