completion-integrity
Enforce code completion integrity
Developers often take shortcuts when completing tasks. This skill provides a git pre-commit hook that blocks commits with integrity violations like warning suppressions, commented tests, and deleted assertions.
Die Skill-ZIP herunterladen
In Claude hochladen
Gehe zu Einstellungen → Fähigkeiten → Skills → Skill hochladen
Einschalten und loslegen
Teste es
Verwendung von "completion-integrity". A developer attempts to commit code with eslint-disable-next-line comments suppressing lint warnings
Erwartetes Ergebnis:
Commit BLOCKED by completion-integrity hook. Reason: Warning suppression detected (eslint-disable). The hook requires developers to fix the underlying issue or document why suppression is necessary in the commit message.
Verwendung von "completion-integrity". A developer deletes 3 assertions from a test file to make tests pass
Erwartetes Ergebnis:
Commit BLOCKED by completion-integrity hook. Reason: Deleted assertions detected (3 total). Removing test checks does not fix bugs. The developer must restore the assertions or fix the underlying code issues.
Verwendung von "completion-integrity". A developer commits code with 5 new TODO comments
Erwartetes Ergebnis:
Commit BLOCKED by completion-integrity hook. Reason: Fresh TODOs detected (5, limit is 2). The developer should defer work by creating explicit tickets rather than leaving undocumented TODOs.
Sicherheitsaudit
Niedriges RisikoAll 14 static findings are false positives. Network finding is standard GitHub URL metadata. Weak cryptographic algorithm flags are triggered by benign words like 'integrity'. Shell command detections are legitimate bash invocations for git hook scripts, not backtick execution. This is a benign development quality tool.
Risikofaktoren
⚙️ Externe Befehle (3)
Qualitätsbewertung
Was du bauen kannst
Prevent testing shortcuts
Team leads can ensure developers do not delete or comment out tests to make code appear to work. The hook blocks commits with test integrity violations.
Maintain code quality standards
Enforce that developers fix warnings rather than suppressing them. The hook catches eslint-disable and pragma warning disable patterns.
Document deferred work properly
Force developers to create explicit tickets for deferred work rather than leaving undocumented TODOs. The hook limits fresh TODOs per commit.
Probiere diese Prompts
Install the completion-integrity git pre-commit hook by running: bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-git-hook.sh"Run a manual integrity check on the current state of the repository using: bash "${CLAUDE_PLUGIN_ROOT}/scripts/integrity-check.sh"My commit was blocked by the integrity hook. The violation was: [describe violation]. Explain why this is flagged and how to fix it properly.
I need to commit code with a legitimate warning suppression. How do I handle this with the completion-integrity hook while providing proper documentation?
Bewährte Verfahren
- Fix the underlying issue rather than suppressing warnings or deleting tests
- Document legitimate suppressions in commit messages with clear justification
- Create tickets for deferred work instead of leaving undocumented TODOs
- Run manual integrity checks before committing to catch issues early
Vermeiden
- Using eslint-disable or pragma warning disable to hide lint errors
- Commenting out or deleting tests to make them pass
- Removing test assertions instead of fixing failing code
- Leaving TODO comments without creating tracking tickets