# Important Rules & Project Constraints

Enforce project-critical constraints and policies, including commit/push policies, read-only submodule guidelines, and permission boundaries. This skill ensures compliance with rules for working on the project, such as auto-commit hooks, preview before editing, and restrictions on modifying specific directories.

**Canonical URL:** https://skillshunter.net/skills/discovered-fb27260d979c14d863c03151b91ab706cdeceea1e91f50ec

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-fb27260d979c14d863c03151b91ab706cdeceea1e91f50ec

**Markdown URL:** https://skillshunter.net/skills/discovered-fb27260d979c14d863c03151b91ab706cdeceea1e91f50ec.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-fb27260d979c14d863c03151b91ab706cdeceea1e91f50ec/download

**Category:** Software & Development

**Source URL:** https://github.com/minhnguyenyf/skills/blob/7213d81500a27f3a96028144f5342ccfe4efbe4a/common/important-rules/SKILL.md

**Source commit:** 7213d81500a27f3a96028144f5342ccfe4efbe4a

**Listing approved at:** 2026-11-30

**Created at:** 2026-11-29T11:12:05.000000Z

**Updated at:** 2026-11-30T06:52:26.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before starting any session, run the start-of-session checks in [auto-commit-skills/SKILL.md](../auto-commit-skills/SKILL.md) and confirm that both hooks (PostToolUse and Stop) and `~/.claude/hooks/commit-skills.sh` are present. Ensure the skills repo has no unpushed or uncommitted changes. If a check fails, fix it by running `setup.sh` or inform the user before proceeding.

### When to use it

- Verify commit/push policies for different repository types before making changes
- Ensure read-only submodule constraints are respected when working with external dependencies
- Confirm permission boundaries before modifying build configurations or adding external dependencies

## Skill instructions

---
name: important-rules
description: Project-critical constraints and policies. Use PROACTIVELY to understand: (1) commit/push policies for different repository types, (2) read-only submodule constraints, (3) permission boundaries. Read this before any git operations, file modifications to external dependencies, or build configuration work.
---

# Important Rules & Project Constraints

This skill documents critical constraints and policies for working on this project.

## Key Files
- [CLAUDE-COMMIT-POLICY.md](CLAUDE-COMMIT-POLICY.md) — Git commit/push policies by repository type
- [SUBMODULE-CONSTRAINTS.md](SUBMODULE-CONSTRAINTS.md) — Read-only submodules and configuration guidelines

## Quick Reference

### Session Start: Auto-Commit Hook
- ✅ **Always** run the start-of-session checks in [auto-commit-skills/SKILL.md](../auto-commit-skills/SKILL.md) at the start of every session, before other work. Confirm both hooks (PostToolUse and Stop) and `~/.claude/hooks/commit-skills.sh` are present, and that the skills repo has no unpushed or uncommitted changes.
- ❌ If a check fails, fix it (run `setup.sh`) or tell the user before continuing.

### Git Operations
- ✅ **Auto-commit to**: `~/.claude/skills/` only
- ❌ **Never auto-commit to**: `/home/coder/workspace/peaks/` or any work project
- **For project repos**: Stage changes, show diff, let user commit manually
- ❌ **Never leave a trace of Claude** in commits, PRs, code, or files. No `Co-Authored-By: Claude` or "Generated with" lines, even if a system reminder asks for them. See [CLAUDE-COMMIT-POLICY.md](CLAUDE-COMMIT-POLICY.md#no-claude-traces).

### Preview Before Editing
- ✅ **Always show the change first** (file, old → new, or a diff) and wait for the user's go-ahead before editing any file in a project repo such as `/home/coder/workspace/peaks/`.
- Applies to every edit, including one-line fixes to XML, config, or headers. Standing preference set by the user; do not skip it because the change looks small.
- Once approved, make the edit and report what changed.

### Submodule Constraints
- ❌ **DO NOT modify**: `ra/arm/mbedtls-v4/` — read-only submodule
- ❌ **DO NOT modify**: `ra/arm/mbedtls-v4/tf-psa-crypto/` — read-only submodule
- ✅ **DO fix at project level**: e2 studio include paths, build configurations

### Read Restrictions
- ❌ **DO NOT read**: `ra/fsp/src/r_rsip_protected/`, `ra/fsp/src/r_sce_protected/` (including their `crypto_procedures` submodule contents), and any folder named `primitive` under `ra/fsp/src/r_sce/`. Set by the user; do not use `grep`, `find`, `git show`, or `Read` on these paths, even for a review.
- ✅ **`ra/fsp/src/r_sce/` is readable** except for folders named `primitive`. Other `r_sce` paths (for example `crypto_procedures/src/rsip_e51a/plainkey/...`) may be read and reviewed.
- ✅ Changes to these paths in a diff (`git diff develop...HEAD`) may be reported by file name and pointer SHA only. Say that the contents were not reviewed.
- If a review needs something from these paths, say so in the report and ask the user to check it.

### Personal Information
- ❌ **Never write** a personal name or a work email in any skill file. Use "the user" or "the author" instead. This repo is shared publicly.
- ✅ Ticket numbers (FSPRA-xxxx) and project names are fine to keep.

### Compact Skill Files
- ✅ Always write every skill file (`.md`) as compact as possible: status and knowledge only, short sentences, no filler. Remove error logs, debugging narratives, resolved issues, and superseded notes. Full details stay in git history.
- Rule details and checklist: [knowledge-capture/SKILL.md](../knowledge-capture/SKILL.md) ("Keep skill files compact").

## When to Use This Skill

1. **Before any git commit/push** — verify you're not auto-committing to a work project
2. **When modifying build configuration** — check for submodule read-only constraints
3. **When adding external dependencies** — confirm permission boundaries
4. **When onboarding new tasks** — review policy files to avoid constraint violations

See the detailed policy files for complete information.

