A personal, living collection of lessons I've taught (or been taught by) AI coding agents. Each "skill" is a short, self-contained Markdown note that captures one recurring problem and the fix, so it can be fed back into future agent sessions.
Just cooy the follow description to your agent:
This is a vibe coding skills library that documents various common problems to help you avoid pitfalls.
https://github.com/chen3feng/agent-skills
Usage: Clone it to the sibling directory as your current project.
Welcome to fork this repository and accumulate your own coding skills.
If agents encounter common insights not unique to their current project while solving problems, they can add them using the format provided in this repository. Note that this repository may be modified by other agents, so you should pull the latest code and submit a pull request (PR) for each modification.
agent-skills/
├── README.md # this file
├── SKILL_FORMAT.md # the authoring conventions every skill follows
└── skills/
└── <skill-slug>/
└── SKILL.md # required; plus optional examples/, assets/
Every skill lives in its own directory under skills/. The directory
name is the skill's slug (lowercase, hyphen-separated). The main file
is always SKILL.md. See SKILL_FORMAT.md for the
exact template.
General engineering workflow:
- git-commit-author-identity — set the right
user.name/user.emailper repo, and avoid thegit -c user.name='First Last'space-splitting trap. - shell-heredoc-and-multiline-strings — passing multi-line commit messages and long strings through an agent terminal without getting eaten by the shell.
- wsl-bash-crlf-or-tempfile — when a Windows shell feeds a bash body into WSL, CRLF and NUL contamination corrupt the first builtin (
set: pipefail : invalid option name); force LF and preferbash <tempfile>overbash -c "<huge string>". - wsl-networking-mode-dns-fallback — when WSL's
mirroredmode fails withConfigureNetworking/0x8007054fand falls back toNone, plus/etc/wsl.confhasgenerateResolvConf=false, the distro has no DNS; disable mirrored, flip the flag back on, andwsl --shutdown. - github-pr-via-gh-cli — standard "branch → push →
gh pr create" recipe, including when fork vs. direct branch is appropriate. - rebase-on-fresh-base-after-merge — after a PR lands, cut the next branch from a freshly-fetched
origin/<default>instead of reusing the merged feature branch. - check-git-log-before-refix — before "fixing" a recurring error,
git log --grepthe symptom and diff againstorigin/<default>; the fix may already exist and your branch / working tree is just stale. - git-rev-parse-multi-ref-short —
git rev-parse --short ref1 ref2 ...fails with "Needed a single revision"; use aforloop or drop--short. - workspace-path-constraints — which tools only accept indexed workspace paths, and how to fall back for sibling repos.
- detect-tool-vendor-by-query — identify a compiler / interpreter by running it (
--version) and caching the answer, not by sniffing its filename — macOS/usr/bin/gccis Apple Clang. - python-code-audit-sweep — run a quick non-behavioral audit of a Python repo and split findings into bug / dead-code / style PRs.
- python-modernization-sweep — plan a Python 3 modernization sweep (f-strings,
super(), type hints) as a series of mechanical PRs, not one mega-PR. - python-indent-aware-edits — over-indented suites are still legal Python;
compileallwon't catch a droppedwith/tryscope, so verify by actually calling the edited function. - test-layout-evolution — when the existing
test/dir is really integration, add unit tests in a paralleltests/unit/instead of mixing them; defer the merge. - sidecar-smoke-suite-reveals-upstream-bugs — a downstream sidecar smoke suite can expose upstream bugs unit tests miss; fix upstream first and close the coverage gap there, then land the sidecar suite with no knobs.
- agent-work-artifacts-layout — where to put PR bodies, throwaway scripts, and audit reports so they don't pollute the repo or get lost.
- repo-org-migration-url-cleanup — after a GitHub repo is transferred to a new owner/org, sweep stale URLs everywhere but preserve historical narrative.
- stop-chasing-the-optimizer-reduce-instead — after two failed anti-optimization patches, stop adding
volatile/noinlineand reduce the repro instead. - per-function-optimize-attribute-abi-mismatch —
__attribute__((optimize("O0")))on one function inside an-O2TU on GCC silently breaks the ABI and crashes on first call. - ue-trefcountptr-member-needs-complete-type — a
TRefCountPtr<T>/TSharedPtr<T>member inside a UE class requiresT's full definition, not a forward decl; header parses fine but the firstMakeShared<Enclosing>()fails at the smart pointer's destructor.
Documentation work:
- chinese-markdown-style — the Chinese-doc style rules I follow, plus how to run the
cndocstylepackage fromcn-doc-style-guideto enforce them. - safe-markdown-auto-fix — how to auto-fix Markdown without corrupting code blocks, inline code, URLs, or HTML.
- doc-code-consistency-check — before editing a README, verify the actual code behavior; don't just "correct" the doc in isolation.
- url-space-after-brackets — always add a space after URL brackets in Markdown to prevent 404 errors with special characters like Chinese text or asterisks.
- Pick a short slug, e.g.
skills/awesome-thing/. - Copy the frontmatter + headings from SKILL_FORMAT.md
into a new
SKILL.md. - Keep it small — one problem, one fix, one or two minimal examples.
- Link it from the relevant section of this README.