Skip to content

chore(ai): add a code-style skill to write human-reviewable code (AI-assisted) - #12700

Merged
slorber merged 1 commit into
mainfrom
claude/code-style-skill
Oct 16, 2026
Merged

slorber merged 1 commit into
mainfrom
claude/code-style-skill

Conversation

@slorber

@slorber slorber commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Humans review all the code of this repository, and agents tend to write long sequential code inlining all the low-level calls, which is hard to review.

This PR adds a code-style agent skill, read before writing or modifying code:

  • Structure code as a tree: a short top-level function giving the high-level picture, delegating to well-named functions, without mixing levels of abstraction, ordered top-down.
  • Make the intent explicit: well-named intermediate variables and functions, related lines grouped together, pure functions, side effects and data loading kept at the edges.
  • Readability over micro-optimizations outside of hot paths.

Since it applies to every code change, AGENTS.md also mentions it in the general rules, in addition to the skills index.

The pnpm catalogs PR stacked on top of this one applies it to its new lintCatalogs.js script.

(AI-assisted)

Test Plan

N/A, agent instructions only.

Test links

Deploy preview: https://deploy-preview-12700--docusaurus-2.netlify.app/

Related issues/PRs

🤖 Generated with Claude Code

…assisted)

Humans review all the code of the repository. The new code-style agent
skill asks agents to:

- Structure code as a tree: a high-level function first, delegating to
  well-named functions, without mixing levels of abstraction
- Make the intent explicit with well-named variables and functions,
  grouped related lines, and pure functions
- Favor readability over micro-optimizations outside hot paths

AGENTS.md references it in the general rules, since it applies to every
code change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@slorber
slorber requested a review from Josh-Cena as a code owner October 16, 2026 12:56
@slorber slorber added the pr: ignore This PR is not meaningful enough to appear in the changelog. label Oct 16, 2026
@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Oct 16, 2026
@slorber
slorber added this pull request to stack #12701 October 16, 2026 12:57
@netlify

netlify Bot commented Oct 16, 2026

Copy link
Copy Markdown

✅ [V2]

Name Link
🔨 Latest commit 886e16e
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6ad21ef6313dd66b7bf7ba86
😎 Deploy Preview https://deploy-preview-12700--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 54 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🔴 49 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 65 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 68 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 67 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 67 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 67 🟢 100 🟢 100 🟠 86 Report

@slorber
slorber merged commit 00be052 into main Oct 16, 2026
18 checks passed
@slorber
slorber deleted the claude/code-style-skill branch October 16, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: ignore This PR is not meaningful enough to appear in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant