Skip to content
Back to skills

Agent Findings

ASecurity

Three things, found while writing the reds for CLI-933 (`eject skills --force` and `eject all --force` overwrite nothing an earlier eject wrote).

  • 8 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 9, 2026
ai-agentsgotesting

Works with

  • cli

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add agents-inc/agents-inc --skill agent-findings --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Findings?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Findings
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agents-inc-agent-findings/badge)](https://www.skillsdirectory.com/skills/agents-inc-agent-findings)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
type: anti-pattern
severity: medium
affected_files:
  - e2e/commands/eject.e2e.test.ts
  - src/cli/lib/__tests__/commands/eject.test.ts
standards_docs:
  - .ai-docs/standards/e2e/test-data.md
  - CLAUDE.md
date: 2026-10-26
reporting_agent: cli-tester
category: testing
domain: cli
root_cause: missing-rule
status: open
---

## What Was Wrong

Three things, found while writing the reds for CLI-933 (`eject skills --force` and
`eject all --force` overwrite nothing an earlier eject wrote).

**The first draft's edit changed which skill the spec was about.** It stood for the user's edit
by replacing an ejected `SKILL.md` whole with one sentence, the shape the `--output` specs in
`eject.test.ts` use. A `SKILL.md` with no frontmatter no longer loads as a local skill. On the next
run the edited skill was no longer an earlier eject's copy, so `eject skills --force` copied it and
only it ("1 skill ejected") and passed over the rest. The edit came back, so the one assertion the
spec existed for passed against the defect. The red came only from the count. This was seen in
both the unit draft and the e2e draft. With the edit appended instead, all four reds fail as the
row says: `Warning: No skills found in the marketplace to eject.`, exit 0.

**A green unit spec pinned the defect.** "says there is nothing to eject when the project holds a
local copy of every skill" reached that warning by running `eject skills --force` over copies in
the installation's skills folder. That is the CLI-933 defect itself. A fix would have reddened it
and read as a regression. CLAUDE.md's rule against encoding a known gap names arity, length and
absence. This one was a message.

**The `it.fails` it replaces asserted only the success line.** A fix that only lifts the filter
under `--force` would print that line while copying nothing. `copySelectedSkill` in
`lib/skills/skill-copier.ts` records a local skill already at its destination in place
(`resolveLocalCopiedSkill`) rather than copying it.

Census of specs that overwrite a `SKILL.md` with text:
`grep -rnE "writeFile.*SKILL_MD|SKILL_MD.*writeFile" src e2e --include='*.ts' --include='*.tsx' | grep -v renderSkillMd`.
Every hit was read. Two stand for a user's edit to an ejected skill: `eject.test.ts`'s "copies only
the skills not already there" and "again, after the user edited a skill the first run put there".
Both write into an `--output` folder that no loader reads, so the missing frontmatter does not
change which path runs. The rest are deliberate no-frontmatter subjects, hashing inputs, or
fixture builders.

## Fix Applied

- The edits now append to the ejected `SKILL.md`, which keeps the frontmatter.
- The specs check that the content is restored as well as the line.
- The `No skills found` pin moved to a state that still reaches it without `--force`: the
  project's copies are in its skills folder and the eject goes to another `--output`. The `--force`
  case became a red.

## Proposed Standard

`.ai-docs/standards/e2e/test-data.md` (it binds unit specs too, so CLAUDE.md › Test Data could
carry it instead): **a fixture standing for a user's edit to an installed artefact leaves the
artefact valid for whatever reads it.** Append to the body, or change a value inside it. Do not
replace the whole file, unless the spec's subject is the invalid file. The check is the control
beside the spec: run without the flag under test and confirm the edited artefact is still classed
as it was before the edit (here, still counted among the skills already there).

This does not conflict with any CLAUDE.md rule. The green pin is a member of "NEVER encode a known
gap in an assertion's ARITY, LENGTH or ABSENCE". A message reached only through the defect is the
same class, and the rule could name it.

Files in this skill

  • 2026-04-21-propagation-skipped-observability-gap.md10.1 KB
  • 2026-04-21-registerProjectPath-sweep-observability-gap.md6.4 KB
  • 2026-08-06-relevance-rule-leaves-custom-source-skills-on-no-agent-stack.md2.5 KB
  • 2026-08-19-a-discard-that-reports-at-migrate-time-is-silent-at-merge-time.md8.1 KB
  • 2026-08-19-five-class-fixes-were-scoped-to-the-file-the-defect-was-found-in.md14.2 KB
  • 2026-08-21-a-closed-union-refuses-a-marketplaces-own-slug-and-answers-with-somebody-elses-catalogue.md6.6 KB
  • 2026-08-21-a-null-coalesce-inside-an-assertion-erases-the-state-the-assertion-is-about.md5 KB
  • 2026-08-21-a-selector-keyed-on-a-bare-callee-reaches-one-of-the-five-shapes-a-test-title-is-written-in.md7.6 KB
  • 2026-08-21-a-spec-hand-rolled-a-reader-that-already-existed.md3.8 KB
  • 2026-08-21-an-eject-test-copies-from-a-fake-home-a-previous-test-already-deleted.md5.6 KB
  • 2026-08-21-hand-written-plugin-state-is-not-uninstallable-so-a-departure-cannot-be-asserted.md4 KB
  • 2026-08-21-the-bundle-gate-is-in-no-pre-merge-run-and-fires-at-the-deploy.md6 KB
  • 2026-08-21-the-task-id-ban-holds-at-its-two-enforceable-locations-and-nowhere-else.md10.1 KB
  • 2026-08-25-a-mocked-collaborator-can-make-loads-and-validates-assert-neither.md5.9 KB
  • 2026-08-26-a-matrix-cells-aria-label-overrides-the-word-that-is-its-whole-state.md6.8 KB
  • 2026-08-26-a-writer-branch-with-no-production-caller-is-pinned-by-a-spec-block.md6.3 KB
  • 2026-09-02-a-page-object-modelling-only-a-controls-resting-state-pushes-every-lifecycle-locator-into-the-specs.md6 KB
  • 2026-09-02-a-parsers-error-message-carries-the-input-that-broke-it.md8.1 KB
  • 2026-09-03-a-double-narrower-than-production-collapses-a-dimension-a-consumer-reads.md7 KB
  • 2026-09-25-a-mock-tool-call-no-spec-sends-was-never-checked-against-the-binary-and-the-binary-refuses-it.md2.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.