Skip to content
Back to skills

Project Guardrails

ASecurity

Establish or audit durable engineering guardrails for an existing code project: AI instructions, architecture boundaries, verification rules, code-comment/documentation conventions, and enforceable quality gates. Use when onboarding a project to AI coding or when its engineering rules are missing, stale, or weak. Do not refactor business code.

  • 43 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentgoexpressrailsrefactoringdocumentation

Security analysis

A100/100

Pro scans all 14 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add KRISACHAN/ying-practice --skill project-guardrails --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Project Guardrails?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Project Guardrails
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/krisachan-project-guardrails/badge)](https://www.skillsdirectory.com/skills/krisachan-project-guardrails)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: project-guardrails
description: Establish or audit durable engineering guardrails for an existing code project: AI instructions, architecture boundaries, verification rules, code-comment/documentation conventions, and enforceable quality gates. Use when onboarding a project to AI coding or when its engineering rules are missing, stale, or weak. Do not refactor business code.
---

# Project Guardrails

Create a durable project engineering profile that later AI work can discover and obey.

Read the shared defaults first:

- `./references/_shared/engineering-principles.md`
- `./references/_shared/module-first-architecture.md`
- `./references/_shared/layered-architecture.md`
- `./references/_shared/code-comments.md`
- `./references/_shared/engineering-documentation.md`
- `./references/_shared/verification.md`

## Scope

Inspect the repository's existing sources of truth before adding anything:

- root and nested agent instructions (`AGENTS.md` or equivalent);
- README / CONTRIBUTING / architecture docs / ADRs;
- source-code comment/doc-comment conventions;
- package/workspace manifests and repository layout;
- lint, formatter, typecheck/compiler, tests and CI;
- package/app/module boundaries and documented public contracts.

Existing explicit project rules outrank this skill group's defaults.

## Workflow

1. **Discover** — map current engineering instructions, architecture docs, code-comment conventions, verification commands, and hard gates.
2. **Assess gaps** — identify missing/contradictory/stale rules, architecture boundaries that exist only implicitly, weak code-level semantic context, and claims that are not executable.
3. **Define the profile** — document project purpose, major app/package/module responsibilities, dependency rules, code-quality expectations, code-comment expectations, documentation navigation, and verification matrix.
4. **Improve instructions** — create/update repository and scoped AI instructions only where they add real local value. Keep them short and navigable.
5. **Define structured code-comment expectations** — comments should help humans/AI understand purpose, capability, responsibility, boundary, contract/invariant, lifecycle/side effects, and tradeoffs where code alone is insufficient. Do not set comment-count quotas or reward syntax narration.
6. **Define engineering-document roles** — README, AGENTS, ADR, architecture indexes, requirements/specs, and focused module docs must have clear ownership and avoid parallel sources of truth.
7. **Prefer executable constraints** — when a rule can safely be enforced with existing lint/type/structural test/CI infrastructure, prefer that over prose-only policy.
8. **Do not break the project to enforce ideals** — if a new hard gate would fail large amounts of existing code, record it as staged debt/target unless the user explicitly authorizes a cleanup campaign.
9. **Verify** — run the narrowest checks needed to prove documentation/config changes are internally consistent.

## Guardrail Content

The profile should make these discoverable:

- project architecture and ownership;
- allowed/forbidden dependency directions;
- public contracts and sensitive boundaries;
- refactoring expectations (behavior preservation, small steps);
- Clean Code expectations without numeric dogma;
- Strategy / Plugin / Adapter decision rules;
- structured code-comment semantics and language/style conventions;
- README / AGENTS / ADR / architecture-index roles and navigation;
- verification commands by scope;
- where requirements, plans, ADRs, and review artifacts live.

## Boundaries

- Do not redesign or refactor business behavior.
- Do not impose Module-first/layering when the project has a coherent alternative architecture.
- Do not add dependencies merely to enforce style when existing tooling can express the rule.
- Do not duplicate the same instruction across many files; use progressive disclosure and nearest-scope overrides.
- Do not force comments or documents to satisfy quotas; require useful semantic context instead.

## Output

Summarize what was discovered, what guardrails were added/changed, what remains advisory, verification performed, and intentionally deferred governance debt.

Files in this skill

  • SKILL.md4.1 KB
  • references/_shared/artifact-protocol.md2.4 KB
  • references/_shared/clean-code.md1.4 KB
  • references/_shared/code-comments.md3.5 KB
  • references/_shared/engineering-documentation.md2.8 KB
  • references/_shared/engineering-principles.md1.7 KB
  • references/_shared/git-commit-protocol.md2.6 KB
  • references/_shared/layered-architecture.md1 KB
  • references/_shared/module-first-architecture.md1.3 KB
  • references/_shared/ports-and-adapters.md1 KB
  • references/_shared/refactoring.md1.8 KB
  • references/_shared/review-system.md2.5 KB
  • references/_shared/strategy-and-plugin.md1.4 KB
  • references/_shared/verification.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.