Skip to main content
skill CX Codex

file-headers — Claude Code skill for source headers and audits

file-headers — a skill that makes coding agents add a header with author and overview to every source file they create or edit. Useful for repos that need one consistent copyright format.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill file-headers -a claude-code
Open on GitHub

What file-headers does

The skill sets a rule for any coding agent in the repo: every applicable source file starts with a header before any code. The header has two parts — a short overview of what the file does and the exact line @author Son Nguyen <[email protected]>. The name and email stay byte-exact across all file types.

Covered extensions are *.js, *.ts, *.tsx, *.cjs, *.mjs, *.py, *.sh and *.css. Excluded are node_modules/, dist/, build/, data/, snapshots, lockfiles, JSON/YAML/Markdown, minified and generated files. Each file type has its own header shape: JS and TS get a block comment with @file, Python puts the author inside the module docstring, shell gets a comment right after the shebang.

A bundled checker lists any file missing the header. Run bash .claude/skills/file-headers/scripts/check-headers.sh — exit code 0 means compliance, 1 means the printed files need attention. For pull requests there is check-headers-pr.sh, which checks only files changed in the PR diff. GitHub Actions runs it on every PR, so a local run before pushing keeps the pipeline green.

What it helps with

  • make the agent add a header to every new source file
  • backfill a missing header when editing an old file
  • audit the whole repo with one shell command
  • wire header checks into CI on every pull request
  • keep the author line identical across file types

Example prompts for the agent

  • Create utils.ts with the header required by the file-headers skill
  • I edited app.py, add the missing author header to it
  • Run check-headers.sh and list files without headers

How to install file-headers

1Skills CLI (Vercel)

npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill file-headers -a claude-code

2Manually: put the files in place

~/.claude/skills/file-headers/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/file-headers/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about file-headers

How do I install file-headers in Claude Code?

Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill file-headers -a claude-code. The skill lands at ~/.claude/skills/file-headers/SKILL.md.

What does file-headers do?

It makes the coding agent write a header with a file overview and the author line into every applicable source file it creates or updates. The rule fires automatically, no prompt needed.

Which files does it cover?

JS, TS, TSX, CJS, MJS, Python, shell and CSS. Skipped are node_modules/, dist/, build/, data/, snapshots, lockfiles, JSON/YAML/Markdown, minified and generated files.

Source text

SKILL.md · MIT
---
name: file-headers
description: MANDATORY for every coding agent (Claude Code, Codex, or any other) on every change-set — every applicable source file the agent creates or updates MUST start with the project's copyright/authorship header (file overview + exact author line). Use automatically whenever writing a new file or editing an existing one; do not wait to be asked. Covers JS/TS/TSX/CJS/MJS, Python, shell, and CSS. Includes the audit script to verify repo-wide compliance.
---

# File Headers — Copyright Comment + File Overview

Every applicable source file in this repository starts with a header comment
containing a **file overview** and the **exact author line**:

```
@author Son Nguyen <[email protected]>
```

The name and email must be exactly as above — no variations, no substitutions,
no other names. This applies to **every coding agent** working in this repo
(Claude Code, Codex, or any other tool): when you **create** a new applicable
file, write the header first; when you **update** an existing applicable file
that is missing the header, add it as part of the same change.

## Applicable files

| Included | Excluded |
| -------- | -------- |
| `*.js`, `*.ts`, `*.tsx`, `*.cjs`, `*.mjs` | anything under `node_modules/`, `dist/`, `build/`, `data/`, `.worktrees/` |
| `*.py`, `*.sh` | vendored/minified files (`*.min.js`, `wiki/mermaid.min.js`) |
| `*.css` | generated files (`wiki/i18n-content.js` — carries its own AUTO-GENERATED banner) |
| | snapshots (`__snapshots__/`), lockfiles, JSON/YAML/Markdown |

## Header formats by file type

**JS / TS / TSX — server & scripts style** (overview inline in `@file`):

```js
/**
 * @file One-to-few-sentence overview of what this file does and why it
 * exists. Mention the key contracts or invariants the file owns.
 * @author Son Nguyen <[email protected]>
 */
```

**JS / TS / TSX — client style** (`@file` name + `@description` overview), used
under `client/src/`:

```ts
/**
 * @file ComponentName.tsx
 * @description What the component/module renders or provides and how it fits
 * into the app.
 * @author Son Nguyen <[email protected]>
 */
```

**CSS** (same block-comment shape as `client/src/index.css`):

```css
/**
 * @file file.css
 * @description What these styles cover.
 * @author Son Nguyen <[email protected]>
 */
```

**Shell** (`#` block right after the shebang; existing overview comments count —
just make sure the `@author` line is in the block):

```bash
#!/usr/bin/env bash
# script-name.sh — what the script does, one to few lines.
# @author Son Nguyen <[email protected]>
```

**Python** (inside the module docstring):

```python
"""
module.py — what the module does.

@author Son Nguyen <[email protected]>
"""
```

## Rules

1. **New file → header first.** Any applicable file you create starts with the
   header before any code (after the shebang for scripts).
2. **Touched file missing header → add it.** If you edit a file that lacks the
   header, add one in the same commit. Write a real overview — describe what
   the file actually does; never a placeholder like "TODO" or "utility file".
3. **Exact author line.** `@author Son Nguyen <[email protected]>` —
   byte-exact, in every file type (shell and Python use it inside `#` / docstring
   comments).
4. **Don't churn existing headers.** If a file already has a compliant header,
   leave it alone unless the file's purpose changed (then update the overview).
5. **Overviews must stay truthful.** When an edit changes what a file does,
   update its `@file`/`@description` overview in the same change.

## Audit

Run the bundled checker to list any applicable file missing the header:

```bash
bash .claude/skills/file-headers/scripts/check-headers.sh
```

Exit code `0` = fully compliant; `1` = the printed files are missing headers.
Run it before finishing any change-set that adds files, and during reviews.

On every pull request, GitHub Actions runs
`.claude/skills/file-headers/scripts/check-headers-pr.sh` against only the
files changed in the PR diff (added, copied, renamed, or modified). Test locally
before pushing:

```bash
bash .claude/skills/file-headers/scripts/check-headers-pr.sh origin/master HEAD
```

© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar skills

All skills for Agent setup: memory, context, orchestration →
security-headers-configuration aj-geddes security-headers-configuration configures HTTP security headers like CSP, HSTS, and X-Frame-Options for web apps. Hardens servers and APIs against XSS, clickjacking, and MIME sniffing. CX Codex +1 522installs vercel-deployment-cursorrules-prompt-file PatrickJS vercel-deployment-cursorrules-prompt-file — a Cursor rule that tells the agent how to ship projects on Vercel. Covers serverless functions, Edge Runtime, middleware, caching and CI/CD. CX Codex +1 ★ 41,178repo stars include-what-you-use mohitmishra786 include-what-you-use — a skill that walks the agent through IWYU: reading its reports, applying mapping files and cutting the #include lines that make C++ builds cascade. CX Codex +1 580installs security-baseline rampstackco security-baseline is a Claude Code skill that sets a security baseline for websites and web apps. It activates for HTTPS, security headers, CSP, secrets planning, and pre-launch reviews. CX Codex +1 297installs agent-ready-link-headers fabricioctelles agent-ready-link-headers is a Claude Code skill that adds Link response headers to a site's homepage so AI agents can discover its API and documentation automatically. CX Codex +1 ★ 141repo stars HTTP Security Headers — HSTS, CSP, Score 0-100 axel-belfort HTTP Security Headers — HSTS, CSP, Score 0-100 is an MCP server for Claude Code that audits web address security headers, finds missing directives, and assigns an overall score. CX Codex +1 4,473installs

From the same set155

The whole set →
trend-forecaster The trend-forecaster subagent projects Claude Code usage and spend from Agent Monitor history. Use it to check expected activity and cost over the coming weeks. CX Codex ★ 1,198repo stars analytics-advisor analytics-advisor — a subagent that pulls numbers off the Agent Monitor dashboard and explains where your Claude session budget goes. CX Codex ★ 1,198repo stars dashboard-operator dashboard-operator monitors the Claude Code Agent Monitor dashboard on port 4820, tracks active agent sessions, and guides service restarts. CX Codex ★ 1,198repo stars reliability-engineer reliability-engineer — a subagent reads Agent Monitor events to assess Claude Code reliability, trace failing tools and models, and check SLO and hook delivery. CX Codex ★ 1,198repo stars orchestration-analyst Multi-agent orchestration analyst. Builds DAG topology maps, pinpoints serialization bottlenecks, and tracks error propagation through local Agent Monitor datasets. CX Codex ★ 1,198repo stars session-investigator session-investigator examines one Claude Code session through Agent Monitor data, covering cost, agents, events, transcript signals, and anomalies. Use it to trace failures. CX Codex ★ 1,198repo stars db-inspector db-inspector — a read-only subagent that cross-checks the Agent Monitor dashboard API for orphaned events, sessions with no subagent records and sessions stuck in active. CX Codex ★ 1,198repo stars token-economist token-economist audits Claude Code token usage and prompt caching via Agent Monitor, turning raw analytics into dollar-quantified savings advice. CX Codex ★ 1,198repo stars

Project sponsors

Companies that keep this analytics open