Skip to content
Back to skills

Pin

ASecurity

Pin a constraint for the current task so it survives compaction and new sessions; path pins are enforced by the file guard

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 27, 2026
ai-agentsgogitapi

Works with

  • api

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add John99101/claude-code-project-template --skill pin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pin?

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

Security grade badge for Pin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/john99101-pin/badge)](https://www.skillsdirectory.com/skills/john99101-pin)

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: pin
description: Pin a constraint for the current task so it survives compaction and new sessions; path pins are enforced by the file guard
argument-hint: "<constraint> | only edit: <globs> | never edit: <globs> | list | clear | remove <n>"
disable-model-invocation: true
---

Arguments: $ARGUMENTS

Pins live in `.claude-pins.md` in the project root (personal, gitignored). The kit puts them back into your context at every session start and after every compaction, and its file guard **blocks** edits that break a path pin. Pins are for the current task; `/pin clear` ends them.

## What to do

- **No arguments or `list`:** show the pins, numbered. None: say so, with an example.
- **`clear`:** delete `.claude-pins.md` and confirm.
- **`remove <n>`:** remove that pin and show the rest.
- **Anything else is a new pin.** Turn it into one line and append it under the heading `# Pinned for this task` (create the file if needed):
  - Paths the user must not have touched: `- never edit: src/api/public/**, migrations/`
  - The only area to work in: `- only edit: src/billing/**, tests/billing/**`
  - Anything else, in the user's words, as a short instruction: `- Don't change the public API.`
  Use project-relative globs; a folder is `dir/`. If one request holds several constraints, write one line each.
  - **"tests are the spec"** (test-first work): find the project's test locations (`tests/`, `__tests__/`, `*_test.go`, `*.test.ts`…) and pin them read-only as `- never edit: <those globs>`, plus the reminder `- The tests define the behaviour: change the code, not the tests.`
- If `.gitignore` doesn't cover `.claude-pins.md`, add that line.

Then show the pins and confirm in one line that they're in force. From now on, follow every pin until it's removed. If the task can't be done without breaking one, stop and ask the user instead of working around it.

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 ai-agents →

Comments

Loading comments…

Newsletter

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