@liumengxinfly: 试了下 improve-codebase-architecture 这个 skill,作者说定期跑这个可以清理 AI Slop,我跑了一下清理的都是用 AI 前我手写的代码
摘要
This article shares a developer's experience using the improve-codebase-architecture skill from mattpocock/skills, which claims to clean up AI-generated slop but apparently also removes code written before using AI. The skill set is a collection of small, composable agent skills for real engineering.
查看缓存全文
缓存时间: 2026/07/15 15:56
试了下 improve-codebase-architecture 这个 skill,作者说定期跑这个可以清理 AI Slop,我跑了一下清理的都是用 AI 前我手写的代码 🤡 https://t.co/z5MMveeEj2
mattpocock/skills
Source: https://github.com/mattpocock/skills
Skills For Real Engineers
My agent skills that I use every day to do real engineering - not vibe coding.
Developing real applications is hard. Approaches like GSD, BMAD, and Spec-Kit try to help by owning the process. But while doing so, they take away your control and make bugs in the process hard to resolve.
These skills are designed to be small, easy to adapt, and composable. They work with any model. They’re based on decades of engineering experience. Hack around with them. Make them your own. Enjoy.
If you want to keep up with changes to these skills, and any new ones I create, you can join ~60,000 other devs on my newsletter:
Quickstart (30-second setup)
- Run the skills.sh installer:
npx skills@latest add mattpocock/skills
-
Pick the skills you want, and which coding agents you want to install them on. Make sure you select
/setup-matt-pocock-skills. -
Run
/setup-matt-pocock-skillsin your agent. It will:- Ask you which issue tracker you want to use (GitHub, Linear, or local files)
- Ask you what labels you apply to tickets when you triage them (
/triageuses labels) - Ask you where you want to save any docs we create
-
Bam - you’re ready to go.
Install as a Claude Code plugin
Prefer a plug-and-play install you don’t maintain by hand? These skills also ship as a native Claude Code plugin. Instead of copying editable files into your repo, the plugin installs the whole skill set as a managed bundle that updates when I ship a new version — you subscribe rather than fork.
Inside Claude Code:
/plugin marketplace add mattpocock/skills
/plugin install mattpocock-skills@mattpocock
Or from your shell:
claude plugin marketplace add mattpocock/skills
claude plugin install mattpocock-skills@mattpocock
Then run /setup-matt-pocock-skills once per repo, exactly as in the quickstart above.
Two ways to install, two philosophies:
- skills.sh copies the skills into your project so you can hack on them and make them your own.
- The plugin keeps them as a read-only, always-current bundle you don’t edit — best when you just want my set to work and follow along as it evolves.
Using Codex or another agent? The skills.sh installer already installs these skills into Codex and other Agent-Skills-standard harnesses today. A native Codex plugin is on the roadmap — see
.agents/adr/0002-ship-as-a-claude-code-plugin.md.
Why These Skills Exist
I built these skills as a way to fix common failure modes I see with Claude Code, Codex, and other coding agents.
#1: The Agent Didn’t Do What I Want
“No-one knows exactly what they want”
David Thomas & Andrew Hunt, The Pragmatic Programmer
The Problem. The most common failure mode in software development is misalignment. You think the dev knows what you want. Then you see what they’ve built - and you realize it didn’t understand you at all.
This is just the same in the AI age. There is a communication gap between you and the agent. The fix for this is a grilling session - getting the agent to ask you detailed questions about what you’re building.
The Fix is to use:
/grill-me- for non-code uses/grill-with-docs- same as/grill-me, but adds more goodies (see below)
These are my most popular skills. They help you align with the agent before you get started, and think deeply about the change you’re making. Use them every time you want to make a change.
#2: The Agent Is Way Too Verbose
With a ubiquitous language, conversations among developers and expressions of the code are all derived from the same domain model.
Eric Evans, Domain-Driven-Design
The Problem: At the start of a project, devs and the people they’re building the software for (the domain experts) are usually speaking different languages.
I felt the same tension with my agents. Agents are usually dropped into a project and asked to figure out the jargon as they go. So they use 20 words where 1 will do.
The Fix for this is a shared language. It’s a document that helps agents decode the jargon used in the project.
Example
Here’s an example CONTEXT.md, from my course-video-manager repo. Which one is easier to read?
- BEFORE: “There’s a problem when a lesson inside a section of a course is made ‘real’ (i.e. given a spot in the file system)”
- AFTER: “There’s a problem with the materialization cascade”
This concision pays off session after session.
This is built into /grill-with-docs. It’s a grilling session, but that helps you build a shared language with the AI, and document hard-to-explain decisions in ADR’s.
It’s hard to explain how powerful this is. It might be the single coolest technique in this repo. Try it, and see.
A shared language has many other benefits than reducing verbosity:
- Variables, functions and files are named consistently, using the shared language
- As a result, the codebase is easier to navigate for the agent
- The agent also spends fewer tokens on thinking, because it has access to a more concise language
#3: The Code Doesn’t Work
“Always take small, deliberate steps. The rate of feedback is your speed limit. Never take on a task that’s too big.”
David Thomas & Andrew Hunt, The Pragmatic Programmer
The Problem: Let’s say that you and the agent are aligned on what to build. What happens when the agent still produces crap?
It’s time to look at your feedback loops. Without feedback on how the code it produces actually runs, the agent will be flying blind.
The Fix: You need the usual tranche of feedback loops: static types, browser access, and automated tests.
For automated tests, a red-green-refactor loop is critical. This is where the agent writes a failing test first, then fixes the test. This helps give the agent a consistent level of feedback that results in far better code.
I’ve built a /tdd skill you can slot into any project. It encourages red-green-refactor and gives the agent plenty of guidance on what makes good and bad tests.
For debugging, I’ve also built a /diagnosing-bugs skill that wraps best debugging practices into a simple loop.
#4: We Built A Ball Of Mud
“Invest in the design of the system every day.”
Kent Beck, Extreme Programming Explained
“The best modules are deep. They allow a lot of functionality to be accessed through a simple interface.”
John Ousterhout, A Philosophy Of Software Design
The Problem: Most apps built with agents are complex and hard to change. Because agents can radically speed up coding, they also accelerate software entropy. Codebases get more complex at an unprecedented rate.
The Fix for this is a radical new approach to AI-powered development: caring about the design of the code.
This is built in to every layer of these skills:
/to-specquizzes you about which modules you’re touching before creating a spec
And crucially, /improve-codebase-architecture helps you rescue a codebase that has become a ball of mud. I recommend running it on your codebase once every few days.
Summary
Software engineering fundamentals matter more than ever. These skills are my best effort at condensing these fundamentals into repeatable practices, to help you ship the best apps of your career. Enjoy.
Reference
These split on one axis — who can invoke them. User-invoked skills are reachable only when you type them (e.g. /grill-me); their job is to orchestrate. Model-invoked skills can be invoked by you or reached for automatically by the agent when the task fits; they hold the reusable discipline. A user-invoked skill may invoke model-invoked skills, but never another user-invoked one.
Engineering
Skills I use daily for code work.
User-invoked
- ask-matt — Ask which skill or flow fits your situation. A router over the user-invoked skills in this repo.
- grill-with-docs — Grilling session that also builds your project’s domain model, sharpening terminology and updating
CONTEXT.mdand ADRs inline. - triage — Move issues through a state machine of triage roles.
- improve-codebase-architecture — Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
- setup-matt-pocock-skills — Configure this repo for the engineering skills (issue tracker, triage labels, domain doc layout). Run once per repo before using the other engineering skills.
- to-spec — Turn the current conversation into a spec and publish it to the issue tracker. No interview — just synthesizes what you’ve already discussed.
- to-tickets — Break any plan, spec, or conversation into a set of tracer-bullet tickets, each declaring its blocking edges — written as text in a local file, or as native blocking links on a real tracker.
- implement — Build the work described by a spec or set of tickets, driving
/tddat pre-agreed seams and closing out with/code-reviewbefore committing. - wayfinder — Plan a huge chunk of work, more than one agent session can hold, as a shared map of investigation tickets on the issue tracker — resolve them one at a time until the way to the destination is clear.
Model-invoked
- prototype — Build a throwaway prototype to answer a design question — a runnable terminal app for state/logic questions, or several radically different UI variations toggleable from one route.
- diagnosing-bugs — Disciplined diagnosis loop for hard bugs and performance regressions: reproduce → minimise → hypothesise → instrument → fix → regression-test.
- research — Investigate a question against high-trust primary sources and capture the findings as a cited Markdown file in the repo, run as a background agent.
- tdd — Test-driven development with a red-green-refactor loop. Builds features or fixes bugs one vertical slice at a time.
- domain-modeling — Actively build and sharpen a project’s domain model — challenge terms against the glossary, stress-test with edge-case scenarios, and update
CONTEXT.mdand ADRs inline. - codebase-design — Shared discipline and vocabulary for designing deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface.
- code-review — Two-axis review of the diff since a fixed point: Standards (does it follow the repo’s coding standards, plus a Fowler smell baseline?) and Spec (does it faithfully implement the originating issue/PRD?), run as parallel sub-agents so neither pollutes the other.
- resolving-merge-conflicts — Work through an in-progress git merge or rebase conflict hunk by hunk, resolving by intent traced to each side’s primary source, then finish the operation — never
--abort.
Productivity
General workflow tools, not code-specific.
User-invoked
- grill-me — Get relentlessly interviewed about a plan or design until every branch of the decision tree is resolved.
- handoff — Compact the current conversation into a handoff document so another agent can continue the work.
- teach — Teach the user a new skill or concept over multiple sessions, using the current directory as a stateful teaching workspace.
- writing-great-skills — Reference for writing and editing skills well: the vocabulary and principles that make a skill predictable.
Model-invoked
- grilling — Interview the user relentlessly about a plan, decision, or idea until every branch of the decision tree is resolved. The reusable loop behind
grill-meandgrill-with-docs.
相似文章
@gyro_ai: https://x.com/gyro_ai/status/2055198700016660826
Matt Pocock 开源了 Skills for Real Engineers,一套小、可组合、可破解的 AI 编程技能,旨在解决 AI 编程中的理解偏差、缺少共享语言、反馈回路缺失和软件熵问题。该工具通过 grill-with-docs、tdd、diagnose 等技能提升 AI 编程效率,并提供了完整工作流。
@sitinme: Google 首席工程师写了 24 个 AI 编程 Skill,把整个开发生命周期都打包了! 上周拿 Claude Code 改一个老 API,需求是给两个接口加缓存。 我先丢了句"帮我加 Redis 缓存",它三分钟写完,看着挺漂亮。 …
Google 首席工程师 Addy Osmani 开源了 agent-skills,包含 24 个 AI 编程技能,将工程纪律打包给 AI agent 使用,以提升代码质量和开发效率。
@axichuhai: https://x.com/axichuhai/status/2062146611472400461
分享8个精选的AI Skill(技能),涵盖基础配置、产品开发和内容创作,帮助提升AI生产力,适用于Claude Code和CodeX等Agent。
@KhuyenTran16: 使AI生成的代码更易于审查和维护。AI生成的代码通常在第一次运行时就能工作,但其结构……
一个为AI代理提供的Clean Code Skills仓库,强制执行Robert C. Martin的原则,以改善AI生成代码的可维护性并减少技术债务。它为Python和TypeScript提供了模块化技能,指导代理编写更整洁、更结构化的代码。
@elldeeone:我已经使用 @mattpocockuk 的 /improve-codebase-architecture 技能几个月了,效果惊人。我还不…
Matt Pocock 的编码助手代理技能库可改善代码库架构和开发者协作对齐。