# Repo Preflight

> Pre-publish health check, retrofit, and audit workflow for GitHub repos. Use when publishing or pushing a project to GitHub, cleaning up a repo before going public, or auditing existing repos for hygiene issues (hardcoded local paths, large files, README structure, community standards).

- Skill: `flan246/repo-preflight` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add flan246/repo-preflight`
- Raw SKILL.md: https://api.skillmd.com/api/skills/flan246/repo-preflight/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: Flan246 (https://skillmd.com/u/flan246)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/flan246/repo-preflight

---


# repo-preflight

## Overview / 概述

**EN:** repo-preflight is an agent-executable workflow for the last mile of GitHub publishing. It scans a repository for publish-blocking hygiene issues, produces a structured remediation report, and applies the approved fixes. It covers three flows:

**中：** repo-preflight 是一套 agent 可执行的 GitHub 发布收尾工作流：扫描仓库中的发布阻断性问题，产出结构化整改报告，并在用户确认后执行整改。共三条流程：

- **publish** — pre-publish health check and cleanup before pushing to GitHub / 首次推送 GitHub 前的体检与清理. Read `references/sop-publish.md`.
- **retrofit** — bring an existing local project up to open-source standards / 把存量本地项目改造到开源标准. Read `references/sop-retrofit.md`.
- **audit** — periodic re-check of an already-published repo / 对已发布仓库的定期复查. Read `references/sop-audit.md`.

## Core discipline / 核心纪律

**EN:**

1. Run `scripts/scan.sh` first — never guess what needs fixing.
2. Report findings against the checklist in `references/checklist.md`; propose fixes, do not apply them silently.
3. Execute irreversible operations (deleting files, rewriting history, pushing) only after explicit user confirmation.
4. Secret scanning is delegated to gitleaks — do not reinvent it.

**中：**

1. 先跑 `scripts/scan.sh`，绝不靠猜来判断要改什么。
2. 对照 `references/checklist.md` 出结构化报告；只提出整改建议，不静默执行。
3. 不可逆操作（删文件、改写历史、推送）必须经用户明确确认后再执行。
4. 密钥扫描委托给 gitleaks，不重造轮子。

## Layout / 目录

- `references/checklist.md` — check item definitions and pass criteria / 体检项定义与通过标准
- `references/sop-*.md` — step-by-step SOPs for each flow / 各流程的分步 SOP
- `scripts/scan.sh` — mechanizable checks (paths, file sizes, structure) / 可机械化扫描项
- `templates/` — README, LICENSE, CONTRIBUTING and other boilerplate / 社区规范件模板

