build-check
Skill0 starsChanged 5 months agoMITView on GitHub
Auto-detects the project's build system and runs compile/type-check after file changes, auto-fixing straightforward errors (max 3 attempts). Use after completing a multi-file feature or when asked to build or check compilation.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- arcasilesgroup/ai-engineeringtheir own version, first seen Nov 8, 2026
- mrieck/snipkiwi-design-extracttheir own version, first seen Oct 11, 2026
- EmeaAppGbb/spec2cloudtheir own version, first seen Oct 9, 2026
- crgarcia12/Liliputtheir own version, first seen Jul 14, 2026
- IjonTychy/brain-iostheir own version, first seen Mar 28, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- EmeaAppGbb/spec2cloud★ 100same name
- arcasilesgroup/ai-engineering★ 65same name
- crgarcia12/Liliput★ 4same name
- IjonTychy/brain-ios★ 1same name
- mrieck/snipkiwi-design-extract★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-validationSkill
- architecture-scannerSkill
- auto-approve-policySkill
- auto-learningSkill
- backend-patternsSkill
- branch-syncSkill
- browser-testSkill
- browseSkill
- cache-refreshSkill
- codebase-explainerSkill
- coding-standardsSkill
- commit-styleSkill
- context-switchingSkill
- continuous-learningSkill
- db-preflightSkill
- env-preflightSkill
- eval-harnessSkill
- feature-completenessSkill
- file-indexSkill
- frontend-patternsSkill
- function-extractSkill
- idev-initSkill
- import-graphSkill
- lessons-learnedSkill
- post-creation-verifySkill
- pre-ship-verifySkill
- project-mapSkill
- self-reviewSkill
- session-resumeSkill
- skill-benchmarkSkill
- skilloptSkill
- smart-contextSkill
- strategic-compactSkill
- task-journalSkill
- tdd-workflowSkill
- test-coverageSkill
- test-mapSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 10 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run once per logical change set — after completing a multi-file feature or a self-contained modification, NOT after each individual file:
- Distinctive: line 13
After completing a multi-file feature (run once at the end)
- Distinctive: line 14
After a single-file change that could affect compilation (run once for that change)
- Distinctive: line 15
When the user asks to build or check compilation
- Very specific: line 71
Write detected build commands to .claude/idev/build-check/cache.json:
- Distinctive: line 100
Before running any build, check for unapplied database migrations:
- Distinctive: line 171
After a successful build, optionally run targeted tests for modified files:
- Very specific: line 183
Test map format (.claude/idev/build-check/test-map.json):
- Distinctive: line 227
Do NOT run build after every single file in a multi-file creation — wait until done
- Very specific: line 228
Do NOT run full build when a quick check (--noEmit, --no-restore) suffices
- Distinctive: line 229
Do NOT hardcode build commands — always detect from project config
- Distinctive: line 230
Do NOT ignore build failures — always report or fix
- Distinctive: line 231
Do NOT run builds for non-compiled file changes
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Build Check Skill
Purpose
Auto-detect the project's build system and run compilation/type-checking after creating or modifying files. Catches errors (missing imports, type mismatches, DI failures) before the user discovers them at runtime.
Activation
Run once per logical change set — after completing a multi-file feature or a self-contained modification, NOT after each individual file:
- After completing a multi-file feature (run once at the end)
- After a single-file change that could affect compilation (run once for that change)
- When the user asks to build or check compilation
How It Works
This skill does NOT hardcode build commands. It detects them from the project.
Results cached in .claude/idev/build-check/cache.json after first detection.
Phase 1: Detect Build System
Scan for build configuration files. Check ALL — do not assume any stack:
.NET:
Glob for *.sln → dotnet build {solution.sln}
Glob for *.csproj (if no .sln) → dotnet build {project.csproj}
Check for specific project to build (API project .csproj for faster builds)
Node.js/TypeScript:
Read package.json → check scripts section:
"build" → npm run build / yarn build / pnpm build
"typecheck" or "tsc" → npm run typecheck (preferred — faster than full build)
"check" → npm run check (Svelte)
Detect package manager: look for yarn.lock, pnpm-lock.yaml, or package-lock.json
Python:
Glob for pyproject.toml → check for build tool (poetry, setuptools, hatch)
Check for mypy.ini or pyproject.toml [tool.mypy] → mypy for type checking
Check for ruff.toml or pyproject.toml [tool.ruff] → ruff check
Java:
Glob for pom.xml → mvn compile
Glob for build.gradle → gradle compileJava / ./gradlew compileJava
Go:
Glob for go.mod → go build ./...
Rust:
Glob for Cargo.toml → cargo check (faster than cargo build)
Ruby:
Glob for Gemfile → bundle exec ruby -c (syntax check)
Check for sorbet → srb tc (type check)
PHP:
Glob for composer.json → check for phpstan or psalm → phpstan analyse / psalmPhase 2: Generate Cache
Write detected build commands to .claude/idev/build-check/cache.json:
{
"generated": "YYYY-MM-DD",
"projects": [
{
"name": "ProjectName",
"root": "relative/path/to/project",
"layer": "backend|frontend",
"buildCommand": "dotnet build path/to/project.csproj",
"typeCheckCommand": "npm run typecheck (if different from build)",
"lintCommand": "npm run lint (if available)",
"workingDirectory": "relative/path (if command must run from specific dir)",
"timeout": 120000
}
],
"quickChecks": {
"backend": "dotnet build path/to/api.csproj --no-restore",
"frontend": "npx tsc --noEmit"
}
}Phase 3: When to Run
Pre-flight: DBScripts check
Before running any build, check for unapplied database migrations:
1. Scan for DBScripts/ folder in the project
2. Compare scripts against .claude/idev/db-preflight/applied.json
3. If unapplied scripts exist:
→ WARN: "N unapplied DBScripts found — builds may fail with 'Invalid object name' errors"
→ List the unapplied scripts
→ Ask user: apply first, or proceed with build anyway?
4. This prevents the recurring 500 errors from missing schema changesThe db-preflight skill provides the full scanning and error-mapping logic. build-check invokes it as a lightweight pre-flight, not a full replacement.
After creating a NEW feature (multi-file):
1. Wait until ALL files are created (entity, DTOs, service, controller, etc.)
2. Run db-preflight pre-flight (check for unapplied DBScripts)
3. Run the backend build command
4. If frontend files were also created, run frontend type-check
5. Report results: success or list of errorsAfter modifying a SINGLE file:
1. Determine which project the file belongs to (check file path against project roots)
2. Run ONLY that project's build/type-check
3. Use quick check command (--no-restore, --noEmit) for speedWhen NOT to run:
- After reading files (no changes made)
- After modifying only .md, .json, .txt, .css files (non-compiled)
- When user explicitly says "don't build" or "skip build"
- When creating skill/config files (not source code)Phase 4: Handle Build Errors
If build succeeds:
Report: "Build passed ✓" (brief, one line)If build fails:
1. Parse error output for:
- File path and line number
- Error code and message
- Missing reference or type
2. Categorize the error:
- Missing using/import → Add it
- Missing registration (DI) → Use post-creation-verify skill
- Type mismatch → Fix the type
- Missing file → Check if it was created
3. Fix the error automatically if it's straightforward
4. Re-run build to verify fix
5. If fix is unclear, report the error to the userError fix limits:
- Max 3 auto-fix attempts per build
- If still failing after 3 attempts, report all errors to user
- Never suppress or ignore build errorsPhase 5b: Test Mapping (absorbed from test-map)
After a successful build, optionally run targeted tests for modified files:
1. Check if .claude/idev/build-check/test-map.json exists
2. If not, generate it by scanning for test files:
- .NET: Glob for *.Tests/**/*.cs, map by naming convention
- JS/TS: Glob for *.test.ts, *.spec.ts, map by import analysis
- Python: Glob for test_*.py, *_test.py
3. For each modified source file, look up its test files
4. Run only the affected tests (not the full suite)
5. Report: "3/3 tests passed" or "1 test failed: ..."Test map format (.claude/idev/build-check/test-map.json):
{
"generated": "YYYY-MM-DD",
"sourceToTests": {
"path/to/Source.cs": ["path/to/SourceTests.cs"]
},
"testRunCommand": "dotnet test --filter {TestClassName}"
}This replaces the standalone test-map skill. The map is generated on first use and updated incrementally when new test files are created.
Phase 5: Usage Commands
The user can trigger builds manually:
- "build" or "check build" → Run all project builds
- "build backend" → Run backend build only
- "build frontend" → Run frontend type-check only
- "skip build" → Suppress auto-build for current task
Integration with Other Skills
After creating a new backend feature:
1. post-creation-verify → Check all registrations exist
2. build-check → Run dotnet build
3. If errors → auto-fix → re-build
4. Report final status
After creating a new frontend feature:
1. build-check → Run tsc --noEmit
2. If errors → auto-fix → re-check
3. Report final statusAnti-Patterns
- Do NOT run build after every single file in a multi-file creation — wait until done
- Do NOT run full build when a quick check (--noEmit, --no-restore) suffices
- Do NOT hardcode build commands — always detect from project config
- Do NOT ignore build failures — always report or fix
- Do NOT run builds for non-compiled file changes
Does 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.

