Skip to content

skill(blog): codex prompt should discover paths, not trust examples#645

Merged
amavashev merged 1 commit into
mainfrom
chore/blog-skill-codex-prompt-discovery
May 14, 2026
Merged

skill(blog): codex prompt should discover paths, not trust examples#645
amavashev merged 1 commit into
mainfrom
chore/blog-skill-codex-prompt-discovery

Conversation

@amavashev
Copy link
Copy Markdown
Contributor

Summary

Small skill correctness fix triggered by codex's open question on PR #644 (LangChain cost_fn post review).

Codex flagged that example file paths in the source-audit prompt (src/langchain_runcycles/...) didn't match the package's actual layout (langchain_runcycles/... — no src/ prefix). The skill currently encourages prescribed-path lookups, which fail silently when packages restructure or use different conventions.

Two surgical edits to both .claude/skills/blog/SKILL.md and .agents/skills/blog/SKILL.md (kept in sync):

1. Phase 4 source-code audit step

Now tells the auditor to discover the repo layout first via gh api repos/<org>/<repo>/git/trees/main?recursive=1 before assuming any path. Names the failure mode explicitly with the LangChain runcycles example.

2. Phase 9a codex prompt template

Replaces the prescribed gh api repos/<org>/<repo>/contents/... example (which codex's read-only sandbox typically cannot shell to anyway) with explicit instructions to:

  • Discover paths first, don't trust example paths
  • Note that codex's read-only sandbox blocks gh shell calls; it routes through its internal GitHub connector instead

Why this is small but useful

This is exactly the class of trap the skill's own source-audit clause was designed to catch — assume verbatim source-of-truth at face value, miss the underlying state drift. Codex caught it in PR #644 and the skill now bakes the lesson in.

Test plan

  • Next blog post that triggers a codex review uses the new path-discovery framing
  • No regression in the existing /blog skill flow — this is additive guidance, not a workflow change

Two edits to .claude/skills/blog/SKILL.md and .agents/skills/blog/SKILL.md
(kept in sync):

1. Phase 4 source-code audit step — instruct the auditor to discover
   the repo layout first via `gh api repos/<org>/<repo>/git/trees/
   main?recursive=1` before assuming any path. Names the example-paths-
   are-stale failure mode explicitly (`langchain_runcycles/...` vs
   `src/langchain_runcycles/...`).

2. Phase 9a codex prompt template — replace the prescribed
   `gh api repos/<org>/<repo>/contents/...` example (which codex
   typically cannot shell to under read-only sandbox) with explicit
   instructions to discover paths and tell codex its read-only sandbox
   blocks `gh` calls, so it should route through its GitHub connector.

Triggered by codex's open question in the v0.2.0 LangChain
runcycles review (PR #644): "Should the source-path references in
the review prompt be updated from `src/langchain_runcycles/...` to
`langchain_runcycles/...`?" — same class of fragility the skill's
own source-audit clause was meant to catch.
@amavashev amavashev merged commit c3b0abe into main May 14, 2026
5 checks passed
@amavashev amavashev deleted the chore/blog-skill-codex-prompt-discovery branch May 14, 2026 14:41
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.

1 participant