Skip to content

Add Codex simplify skill - #197

Merged
haacked merged 6 commits into
mainfrom
haacked/codex-simplify-skill
Aug 27, 2026
Merged

Add Codex simplify skill#197
haacked merged 6 commits into
mainfrom
haacked/codex-simplify-skill

Conversation

@haacked

@haacked haacked commented Aug 26, 2026

Copy link
Copy Markdown
Owner
  • Add a simplify skill under a new ai/codex/skills/ root, which only the Codex installer walks. Claude keeps its bundled /simplify, and the Claude installer's skill loop needs no per-platform branch.
  • Extract the excluded-skills parser into ai/helpers/excluded-skills.sh. It replaces four near-duplicate copies across the Codex installer and the three skill tests. A looser matcher can no longer call a skill excluded that the installer still ships.
  • Add remove_managed_link to ai/helpers/managed-links.sh as the removal counterpart to install_managed_link. Both installers now use it, so they agree on which symlinks this repo owns and leave unmanaged ones alone.
  • Run every check in ai/tests/test-skill-spec.sh and ai/tests/test-canonical-skills.sh against both skill roots, off one shared list. A Codex-only skill is now checked for hardcoded ~/.claude paths, absolute self-references, dangling scripts/ paths, and a malformed metadata: block, which Codex would otherwise treat as a reason to drop the skill silently. Both files fail if a declared root contributes no skills.
  • Run every script under ai/tests/ in CI. test-canonical-skills.sh was excluded over a false positive in sprint-planning that no longer exists, and test-plain-writing-contract.sh had never been wired up.
  • Cover the second prefix the Codex uninstall sweep passes, and the branch in remove_managed_link that removes a symlink whose target is gone.
  • Name the simplify skill rather than the slash command in the shared agent docs.

Test plan

  • shfmt -d ai/tests/test-ai-installers.sh
  • shellcheck ai/tests/test-ai-installers.sh
  • sh -n ai/install-claude.sh
  • bash -n ai/tests/test-ai-installers.sh
  • ai/tests/test-ai-installers.sh
  • ai/tests/test-canonical-skills.sh
  • ai/tests/test-plain-writing-contract.sh
  • python3 ai/skills/plain-writing/scripts/tests/test_plain_writing_lint.py
  • ai/tests/test-skill-spec.sh

@haacked haacked changed the title Add shared simplify skill Add Codex simplify skill Aug 27, 2026
ai/helpers/excluded-skills.sh holds the one parser both installers and the
three skill tests read, so a looser matcher can no longer disagree with an
installer about which skills a platform excludes.

The Claude installer tests loop over the exclusion lists rather than naming
a skill, so a new entry is covered without new assertions.

Claude-Session: https://claude.ai/code/session_01KJkXqGq8Jm5Kj9EH8yuxR6
Claude bundles a simplify workflow under that name, so ours goes to Codex
alone. Its location decides that: the Codex installer walks both skill roots
into one destination, and the Claude installer's loop carries no per-platform
branch. The skill tests validate both roots, so a Codex-only skill still meets
the spec and still pairs its model with a matching execution tier.

remove_managed_link in ai/helpers/managed-links.sh decides what this repo owns
for every uninstall sweep, so it and install_managed_link share one definition.

Claude-Session: https://claude.ai/code/session_01KJkXqGq8Jm5Kj9EH8yuxR6
@haacked
haacked force-pushed the haacked/codex-simplify-skill branch from 59af308 to 0dc3fb9 Compare August 27, 2026 21:16
The Codex-only root reached one of the five checks in
test-canonical-skills.sh, so a hardcoded ~/.claude path, an absolute
self-reference, a dangling scripts/ path, or a scalar metadata: block
shipped from it with nothing reporting. All five checks now run off one
skill_dirs list built from both roots, the way test-skill-spec.sh
already does, and the self-reference pattern derives from each skill's
own root so a Codex skill can match it at all.

Both files now require every declared root to contribute a skill. The
Codex root holds exactly one, so deleting it would otherwise drop the
whole root out of every check while the suite stayed green.

test-canonical-skills.sh runs in CI again. It was excluded over a false
positive in sprint-planning that no longer exists, and it passes on main.

The Codex uninstall sweep gets a test for the second prefix it passes,
asserted after a check that the link was installed, and
remove_managed_link's dangling-symlink branch gets a fixture whose
target does not exist. Dropping either behavior fails only its own
check.

excluded-skills.sh credited both installers though only the Codex one
sources it, and go/SKILL.md named the same step two ways.

Claude-Session: https://claude.ai/code/session_01KJkXqGq8Jm5Kj9EH8yuxR6
It is the last script under ai/tests/ that no workflow ran, so a skill
could drop its plain-writing delegation and nothing would report it.

It needs no HOME and no ~/.dotfiles, and it checks callers under
ai/skills/ only, which is right: no Codex-only skill delegates prose
editing yet.

Claude-Session: https://claude.ai/code/session_01KJkXqGq8Jm5Kj9EH8yuxR6
@haacked
haacked marked this pull request as ready for review August 27, 2026 23:01
@haacked
haacked requested a lite review from Copilot August 27, 2026 23:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are cohesive, consistently applied across installers/tests/docs, and the new Codex-only skill root is validated and covered in CI.

Pull request overview

This PR extends the dotfiles AI tooling to support a Codex-only simplify skill, while de-duplicating installer/test logic so both platforms validate and manage skills consistently.

Changes:

  • Introduces a new Codex-only skill root (ai/codex/skills/) and adds the simplify skill there to avoid clobbering Claude’s bundled workflow.
  • Centralizes the excluded-skills parsing logic into ai/helpers/excluded-skills.sh and updates installers/tests to use the shared implementation.
  • Adds remove_managed_link to the managed link helpers and expands CI to run the full ai/tests/ suite, including canonical skill checks and the plain-writing contract test.
File summaries
File Description
README.md Documents Codex exclusions and the Codex-only skill root; adds simplify to the skills table and updates agent docs phrasing.
ai/tests/test-skill-spec.sh Validates both skill roots and shares excluded-skill parsing; ensures neither root silently contributes zero skills.
ai/tests/test-canonical-skills.sh Checks both skill roots for Codex-install compatibility; shares excluded-skill parsing and improves root coverage.
ai/tests/test-ai-installers.sh Updates tests to use the shared exclusion parser; adds uninstall coverage for Codex-only skills and dangling managed symlinks.
ai/skills/go/SKILL.md Updates references from /simplify slash command wording to the simplify skill wording.
ai/README.md Documents codex/skills/ as a Codex-only root and clarifies how both roots land in the Codex destination dir.
ai/install-codex.sh Installs skills from both roots, shares excluded-skill logic, and uses managed-link removal helper for uninstall sweeps.
ai/install-claude.sh Uses remove_managed_link for uninstall cleanup (instructions, agents, skills).
ai/helpers/managed-links.sh Adds remove_managed_link as the uninstall counterpart to install_managed_link.
ai/helpers/excluded-skills.sh New shared implementation of is_excluded_skill to keep installers/tests in sync.
ai/codex/skills/simplify/SKILL.md New Codex-only simplify skill definition with tier metadata.
ai/agents/code-reviewer.md Updates guidance to reference the simplify skill rather than /simplify.
ai/AGENTS.md Updates workflow step wording to reference the simplify skill.
.github/workflows/test.yml Runs all AI test scripts in CI, including canonical skills and plain-writing contract checks.
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@haacked
haacked merged commit f7bfa75 into main Aug 27, 2026
2 checks passed
@haacked
haacked deleted the haacked/codex-simplify-skill branch August 27, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants