12 Commits

Author SHA1 Message Date
Matthew Kern 64a8c3f00b Update second-opinion Codex model to gpt-5.5 (#163)
* Update second-opinion Codex model to gpt-5.5-codex

Bump primary model from gpt-5.3-codex to gpt-5.5-codex and fallback
from gpt-5.2-codex to gpt-5.4-codex. Plugin version 1.6.0 → 1.7.0.

* fix: correct Codex model name from gpt-5.5-codex to gpt-5.5

---------

Co-authored-by: Dan Guido <dan@trailofbits.com>
2026-06-10 15:41:40 -04:00
Lixin2026 d5fe2e6a78 feat(codex): add UI metadata for skills (#175)
* feat(codex): add skill UI metadata

* Use official Trail of Bits logo

* fix: resolve code review findings for PR #175

Codex silently drops the icons as authored: its loader
(codex-rs/core-skills resolve_asset_path) requires icon paths
containing '..' to resolve under <plugin_root>/assets/, and the
repo-root .codex/assets location fails that containment check.
Verified empirically via codex app-server plugin/read: every
iconSmall/iconLarge came back null; only brand_color applied.

P1 fixed:
- Vendor trail-of-bits-mark.svg into plugins/<name>/assets/ for
  all 38 plugins with skills and point every openai.yaml at
  ../../assets/trail-of-bits-mark.svg (the supported plugin-level
  shared asset pattern). Icons now resolve for marketplace
  installs too, since nothing escapes the plugin root.
- Drop the .codex/ additions: .codex/skills/gh-cli/agents/
  openai.yaml resolved nowhere (.codex/skills is not a Codex
  discovery root) and PR #173 removes the whole .codex/ tree

P2 fixed:
- Patch-bump all 38 touched plugins in plugin.json and
  marketplace.json so installed clients pick up the metadata

Verified:
- Static check replicating Codex's resolution algorithm: all 73
  yaml files resolve under their plugin assets/ and exist
- Live codex app-server probe: 71/72 loadable skills report
  resolved iconSmall/iconLarge and brand_color #D83A34
  (claude-in-chrome-troubleshooting fails to load on main due to
  a pre-existing 64-char qualified-name limit, fixed by #173's
  rename; zeroize-audit's manifest mcpServers object is likewise
  a pre-existing Codex incompatibility fixed by #173)
- validate_codex_skills.py, validate_plugin_metadata.py, prek all
  pass

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(codex): use skill-local icon assets

---------

Co-authored-by: Dan Guido <dan@trailofbits.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 12:28:41 -04:00
Jonathan Hefner debfb29c8e Fix allowed-tools to use spec-compliant space-delimited strings (#139)
* Fix `allowed-tools` to use spec-compliant space-delimited strings

Per the agentskills.io specification, `allowed-tools` must be a single
string of space-delimited patterns, not a YAML list. Converted all 23
SKILL.md files from the `- Item` list format to the correct
`"Item1 Item2"` string format. Also updated the frontmatter examples in
CLAUDE.md and the workflow-skill-design skill template to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix remaining allowed-tools format in firebase-apk-scanner and workflow-skill-design docs

- Convert firebase-apk-scanner from comma-separated to space-delimited
- Update anti-patterns.md and tool-assignment-guide.md examples from YAML lists to space-delimited strings
- Remove unnecessary quotes from SKILL.md template placeholder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Cover commands, new SKILL.md files, and fix template placeholder

Extends the previous spec-compliance fixes:

* Convert command frontmatter (commands/*.md) — per Claude Code
  docs, command files use the same frontmatter as skills, so the
  same space-delimited rule applies.
* Convert three SKILL.md files added since the original PR:
  mutation-testing, trailmark-structural, trailmark-summary.
* Fix the placeholder in the workflow-skill-design template.
  The previous "[minimum tools needed, space-delimited]" was YAML
  flow-sequence syntax, which parses as a list — the opposite of
  what the placeholder claims. Replaced with a concrete-looking
  space-delimited example plus a comment.

Zeroize-audit agent files still use `allowed-tools:` in YAML list
form. They are intentionally excluded: per the project's own docs
(workflow-skill-design references), agents declare tools with
`tools:` (not `allowed-tools:`). Fixing those requires changing
the field name as well as the format and is out of scope for this
PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* zeroize-audit agents: switch allowed-tools to tools

Subagents declare their tool allowlist via `tools:` (comma-separated),
not `allowed-tools:` — see Claude Code's subagent docs and this
repo's own designing-workflow-skills/SKILL.md:47:

> Skills use `allowed-tools:` in frontmatter. Agents use `tools:`
> in frontmatter.

Before this change, the zeroize-audit agents declared their tool list
under `allowed-tools:`, which Claude Code does not read for subagents.
The field was effectively a no-op; the spawned agents had no tool
restriction enforced.

Renames the field on all 11 agents to `tools:` and reformats the YAML
list as comma-separated to match the documented format and existing
agents elsewhere in the repo (e.g. function-analyzer.md,
spec-compliance-checker.md). Tool sets are unchanged.

Behavior change: tools now actually constrain what each spawned agent
can call. The lists are the ones the original author intended.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* skill-improver: convert command allowed-tools to space-delimited

The two command files in plugins/skill-improver/commands/ still used
the JSON flow-array format (`allowed-tools: ["..."]`), which the rest
of this PR converted everywhere else. Convert them to the spec-compliant
space-delimited string form for consistency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Dan Guido <dan@trailofbits.com>
2026-04-28 19:50:30 -04:00
Dan Guido 1a868d25d2 second-opinion: use Codex CLI's built-in MCP server (#110)
* Replace third-party codex-mcp-server with Codex CLI's built-in MCP server

Swap `uvx codex-mcp-server` (third-party Python package) for `codex mcp-server`
(built-in to the Codex CLI). Eliminates the Python/uvx dependency and uses
OpenAI's officially maintained MCP server instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Gitignore uv.lock at repo root

No root pyproject.toml exists — the lockfile is a stale artifact from
an accidental uv invocation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix stale references to third-party codex-mcp-server

Update root README table and .gitignore comment to reflect the switch
to Codex CLI's built-in MCP server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 01:03:31 -05:00
Dan Guido 60ab7b0fe0 Fix second-opinion Codex schema validation and update Gemini model (#103)
codex-review-schema.json failed OpenAI structured output validation
because required arrays didn't include all sibling property keys when
additionalProperties: false was set. Made optional fields nullable
and added them to required to satisfy the constraint.

Update Gemini model from gemini-3-pro-preview to gemini-3.1-pro-preview
following the Feb 19 release.

Bump version 1.5.0 → 1.5.1.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:56:28 -07:00
Dan Guido c557d2a269 Bundle codex-mcp-server into second-opinion plugin (#95)
Add .mcp.json to auto-start the codex-mcp-server when the plugin is
installed, providing codex_ask, codex_exec, and codex_review MCP tools.
The MCP tool descriptions are self-documenting — no separate skill
docs needed. Bump version to 1.5.0.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-18 23:49:35 -07:00
Dan Guido 776ccc812c second-opinion: switch Codex from codex review to codex exec (#93)
* Switch second-opinion Codex path from codex review to codex exec

Use codex exec with --output-schema and -o (--output-last-message)
instead of codex review. This eliminates context waste from verbose
[thinking] and [exec] blocks by capturing only the structured JSON
review output to a file. Uses OpenAI's published code review prompt
that GPT-5.2-codex was specifically trained on.

Also lowers default reasoning from xhigh to high, removes the
--base/--commit prompt limitation (all scopes now support project
context and focus instructions), and adds a JSON schema for
structured findings output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix review issues: untracked files, hardcoded paths, schema naming

- Include untracked files in uncommitted scope diff using
  git ls-files + git diff --no-index, matching the coverage
  that codex review --uncommitted previously provided
- Replace hardcoded /tmp/ paths with mktemp for portability
- Rename absolute_file_path to file_path in schema since
  git diff produces relative paths
- Capture stderr to a log file instead of /dev/null for
  faster error diagnosis without retry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix PR review findings: schema constraints, flag naming, citation

- Add required and additionalProperties: false to JSON schema
- Use -o (short flag) consistently; clarify --output-last-message
- Add cookbook citation URL for the code review prompt
- Add || true to git diff --no-index (exits 1 on diff found)
- Fix schema.json → codex-review-schema.json in SKILL.md quick ref

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Restore xhigh reasoning effort, fix cookbook citation URL

- Change reasoning effort back to xhigh from high
- Update cookbook URL to canonical developers.openai.com domain
  (old cookbook.openai.com returns 308 redirect)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 03:05:33 -07:00
Dan Guido d3630e5193 Skip dep scan when diff doesn't touch dependency files (#91)
The Gemini `/security:scan-deps` command scans the entire project
dependency tree regardless of what changed. This wastes time when
reviewing small config or code changes that don't involve dependencies.

Now the scan only runs when the diff actually touches manifest files
(package.json, Gemfile, requirements.txt, Cargo.toml, go.mod, etc.).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:33:36 -05:00
Dan Guido 42466c4600 Fix Gemini heredoc patterns that prevent variable expansion (#87)
* Fix Gemini heredoc patterns that prevent variable expansion

Single-quoted heredoc delimiters (<<'PROMPT') suppress shell
substitution, so $(cat /tmp/review-diff.txt) was passed to
Gemini as literal text. Replaced all heredoc patterns with
pipe-based construction ({ printf ...; cat ...; } | gemini)
which avoids both the quoting bug and shell metacharacter
issues from unquoted heredocs (diffs contain $ and backticks).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Bump second-opinion version in marketplace.json to match plugin.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Clarify marketplace.json path in CLAUDE.md PR checklist

The checklist said `.claude-plugin/marketplace.json` which is
ambiguous — every plugin has its own `.claude-plugin/` directory.
Specify that the marketplace.json is at the repo root, distinct
from each plugin's `.claude-plugin/plugin.json`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:53:29 -05:00
Dan Guido d98cfc79ad Fix second-opinion skill issues found in live testing (#70) (#70)
- Fix "sequentially" → "parallel" in Question 1 to match Running Both section
- Document Codex context limitation for --base/--commit (skill will not
  create AGENTS.md; inform user of the limitation instead)
- Add Codex output parsing guidance (summarize findings, don't dump 55KB
  of raw thinking/exec blocks)
- Document EPERM/sandbox errors as expected (codex review is sandboxed,
  cannot run tests or builds)
- Bump version to 1.2.0

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 02:05:44 -05:00
Dan Guido 211ecdec1c Fix second-opinion skill: broken Codex prompt passing, unnecessary upfront checks, parallel reviews (#69)
- Fix Codex --base/--commit prompt passing: the positional [PROMPT] arg
  is mutually exclusive with these flags (confirmed via CLI), and stdin
  via `-` is also rejected. Document the AGENTS.md workaround instead.
- Remove upfront `command -v` availability checks. Just run the tool and
  handle errors — saves a turn and avoids mishandled control flow.
- Run Codex and Gemini reviews in parallel (both are read-only, no
  shared state) instead of sequentially.
- Expand error handling table with explicit per-extension install URLs.
- Bump version to 1.1.0.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 01:30:17 -05:00
Dan Guido bf125052d4 Add second-opinion skill for external LLM code reviews (#68)
Shells out to OpenAI Codex CLI and Google Gemini CLI to get
independent code reviews from different models on uncommitted
changes, branch diffs, or specific commits.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 00:57:34 -05:00