repo-hardening

repo-hardening is a skill for Claude Code, Codex from forjd/agent-skills. It costs 93 tokens per session (1,273 once invoked), scanned A, original, MIT.

A workflow for checking and improving a GitHub repository's security settings using the gh command-line tool.

In plain words
What is it for?
Use it to audit repository security, review findings, and selectively apply hardening changes when you have administrator access.
Why use it?
It helps reveal weak protections around branches, secrets, pull requests, and GitHub Actions before changes are applied.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit repository security, review findings, and selectively apply hardening changes when you have administrator access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/forjd/agent-skills/repo-hardening
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add forjd/agent-skills --skill repo-hardening
Clone the repo
git clone --depth 1 https://github.com/forjd/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for repo-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/forjd/agent-skills/repo-hardening/github.svg)](https://agentmods.dev/skills/forjd/agent-skills/repo-hardening)
Your own site
<a href="https://agentmods.dev/skills/forjd/agent-skills/repo-hardening"><img src="https://agentmods.dev/badge/skills/forjd/agent-skills/repo-hardening/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for repo-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/forjd/agent-skills/repo-hardening"><img src="https://agentmods.dev/badge/skills/forjd/agent-skills/repo-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00093 $0.01273
Opus 5 $0.00046 $0.00636
Sonnet 5 $0.00019 $0.00255
Haiku 4.5 $0.00009 $0.00127

Measured 11d ago against content hash 01be6e5adf50, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

repo-hardening scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/harden.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/repo-hardening/SKILL.md · 112 lines

How it starts

The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repo Hardening

Audit and fix GitHub repository security settings using the bundled scripts/harden.sh.

Prerequisites

Before running the script, ensure:

  1. gh CLI is installed and authenticated (gh auth login)
  2. jq is installed
  3. The user has sufficient access to the target repository:
    • audit can run with read access, with inaccessible endpoints reported as skip
    • fix requires admin access

The script checks prerequisites and exits with a clear error if required tools, authentication, or fix permissions are missing.

Workflow

Always follow this sequence:

  1. Resolve the script path — run the bundled script via the path to this skill directory, not the current project directory:

    SKILL_DIR="/path/to/repo-hardening"  # directory containing this SKILL.md
    HARDEN_SCRIPT="$SKILL_DIR/scripts/harden.sh"
    
  2. Audit first — run the audit to see current state:

    bash "$HARDEN_SCRIPT" audit --repo OWNER/REPO
    
  3. Present findings — summarise the audit results to the user, highlighting fail and warn items grouped by severity (critical > high > medium > low).

  4. Dry-run before fixing — ask the user which categories to fix. Use explicit --checks to scope fixes to the confirmed categories, then run --dry-run before any mutation:

    bash "$HARDEN_SCRIPT" fix --repo OWNER/REPO --checks branches,security --dry-run
    

    If branch protection has no existing required status checks, pass each CI context explicitly:

    bash "$HARDEN_SCRIPT" fix --repo OWNER/REPO --checks branches --required-check "test" --dry-run
    
  5. Apply the exact approved plan — once confirmed, rerun the exact dry-run command with only --dry-run removed. Keep the same scoped --checks and any --required-check options from the preview:

    bash "$HARDEN_SCRIPT" fix --repo OWNER/REPO --checks branches,security
    
    # If the approved dry-run included required checks:
    bash "$HARDEN_SCRIPT" fix --repo OWNER/REPO --checks branches --required-check "test"
    

Read the full file on GitHub · 112 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 112 lines · 93 tokens per session scan A 01be6e5adf50

Subscribe to this mod's changes

repo-hardening is a skill published in the GitHub repository forjd/agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 93 tokens to every session and 1,273 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

article-writing

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

affaan-m/ECC · 57 tokens

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

taiyi-ui-design

A design-planning guide for describing how an application's user interface should look and behave. It produces a UI-DESIGN.md document covering layouts, components, interactions, accessibility, and error states.

Dong90/oh-my-taiyiforge · 35 tokens

remove

Remove a deployed framework or addon from the current workspace.

jmagly/aiwg · 12 tokens

ln-62-repository-publisher

Commits, pushes, and remotely verifies authorized repository changes. Not for releases, package publication, or announcements.

levnikolaevich/claude-code-skills · 30 tokens

maggy

Maggy is a local AI engineering command center. AI-prioritized inbox across issue trackers (GitHub Issues/Asana), one-click TDD execute with iCPG context enrichment, daily competitor intelligence briefing.

alinaqi/maggy · 46 tokens