Agent skill
check-compliance
Run full compliance checks before and after changes
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/check-compliance-baphled-dotopencode
SKILL.md
Skill: check-compliance
What I do
I ensure all code changes meet project standards for quality, security, and licensing before they reach the repository. I enforce a "verify before you commit" discipline that prevents broken builds and security regressions.
When to use me
- Before staging changes for a new commit
- After finishing a feature or bug fix to verify integration
- When a pre-commit hook fails and requires manual investigation
- To ensure local environments match CI/CD gate requirements
Core principles
- Local verification first — Never rely on CI to catch basic formatting or linting errors.
- Comprehensive coverage — Checks must include linting, formatting, unit tests, and security scans.
- Fail fast — Stop the commit process immediately if any check fails.
- No bypass — Avoid --no-verify unless in an extreme emergency with stakeholder approval.
Patterns & examples
Compliance check sequence:
- Linting: Static analysis to catch syntax and logic errors (e.g. eslint, golangci-lint).
- Formatting: Ensure consistent code style (e.g. prettier, gofmt).
- Security: Scan for secrets and vulnerable dependencies (e.g. gitleaks, npm audit).
- Testing: Run the local test suite to ensure no regressions.
Standard Makefile implementation:
check-compliance:
@echo "Running compliance checks..."
@npm run lint
@npm run format:check
@npm test
@gitleaks detect --source .
Pre-commit hook configuration (.pre-commit-config.yaml):
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaks
Anti-patterns to avoid
- ❌ Committing with failures — Fixing "later" leads to broken main branches and technical debt.
- ❌ Inconsistent local/CI checks — If it passes locally but fails in CI, the local checks are incomplete.
- ❌ Manual-only checks — If checks aren't automated via a command or hook, they won't be run consistently.
KB Reference
~/vaults/baphled/3. Resources/Knowledge Base/AI Development System/Skills/Code-Quality/Check Compliance.md
Related skills
static-analysis— Deep analysis of code quality and logicdependency-management— Scanning for vulnerable third-party packagessecurity— Secure coding practices and input validationbdd-workflow— Running behavioural tests as part of compliance
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?