Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

v1.59.1.0 fix: shrink gstack skill descriptions #1972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hadrien-de-march wants to merge 1 commit into garrytan:main
base: main
Choose a base branch
Loading
from hadrien-de-march:fix/codex-skills-budget-warning
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [1.59.1.0] - 2026年06月11日

## **Codex no longer pays for full gstack routing prose at startup.**

Codex and other external hosts now get the same compact skill catalog treatment
Claude already had: frontmatter keeps only the short catalog lead, while the
long "Use when" and proactive-routing prose moves into the skill body. This
removes the skills-context-budget startup warning without deleting routing
guidance from the skills themselves.

### Fixed
- External-host gstack skill generation now applies catalog trimming instead of
preserving full multi-line descriptions in always-loaded frontmatter.
- Added a Codex catalog budget regression test so the generated description set
stays compact across future skill additions.

## [1.57.10.0] - 2026年06月10日

## **Codex review now runs by default everywhere it matters.**
Expand Down
2 changes: 1 addition & 1 deletion VERSION
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.57.10.0
1.59.1.0
2 changes: 1 addition & 1 deletion package.json
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gstack",
"version": "1.57.10.0",
"version": "1.59.1.0",
"description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.",
"license": "MIT",
"type": "module",
Expand Down
5 changes: 3 additions & 2 deletions scripts/gen-skill-docs.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,10 @@ function processTemplate(tmplPath: string, host: Host = 'claude'): { outputPath:
content = header + content;
}

// Catalog trim (Claude only — external hosts have their own frontmatter shapes)
// Catalog trim: keep the always-loaded frontmatter catalog small for every
// host, then move routing/voice prose into the skill body.
let catalogParts: CatalogParts | null = null;
if (host === 'claude' && CATALOG_MODE === 'trim') {
if (CATALOG_MODE === 'trim') {
const trimmed = applyCatalogTrim(content, skillName);
if (trimmed) {
content = trimmed.content;
Expand Down
16 changes: 10 additions & 6 deletions test/fixtures/golden/codex-ship-SKILL.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
---
name: ship
description: |
Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION,
update CHANGELOG, commit, push, create PR. Use when asked to "ship", "deploy",
"push to main", "create a PR", "merge and push", or "get it deployed".
Proactively invoke this skill (do NOT push/PR directly) when the user says code
is ready, asks about deploying, wants to push code up, or asks to create a PR. (gstack)
description: "Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, update CHANGELOG, commit, push, create PR. (gstack)"

---
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run gen:skill-docs -->


## When to invoke this skill

Use when asked to "ship", "deploy",
"push to main", "create a PR", "merge and push", or "get it deployed".
Proactively invoke this skill (do NOT push/PR directly) when the user says code
is ready, asks about deploying, wants to push code up, or asks to create a PR.

## Preamble (run first)

```bash
Expand Down
15 changes: 9 additions & 6 deletions test/fixtures/golden/factory-ship-SKILL.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
---
name: ship
description: |
Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION,
update CHANGELOG, commit, push, create PR. Use when asked to "ship", "deploy",
"push to main", "create a PR", "merge and push", or "get it deployed".
Proactively invoke this skill (do NOT push/PR directly) when the user says code
is ready, asks about deploying, wants to push code up, or asks to create a PR. (gstack)
description: "Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, update CHANGELOG, commit, push, create PR. (gstack)"
user-invocable: true
disable-model-invocation: true
---
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run gen:skill-docs -->


## When to invoke this skill

Use when asked to "ship", "deploy",
"push to main", "create a PR", "merge and push", or "get it deployed".
Proactively invoke this skill (do NOT push/PR directly) when the user says code
is ready, asks about deploying, wants to push code up, or asks to create a PR.

## Preamble (run first)

```bash
Expand Down
33 changes: 27 additions & 6 deletions test/gen-skill-docs.test.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,28 @@ describe('gen-skill-docs', () => {
expect(violations).toEqual([]);
});

test('Codex generated skill catalog stays compact enough for startup context', () => {
const agentsDir = path.join(ROOT, '.agents', 'skills');
if (!fs.existsSync(agentsDir)) return;
const descriptions: Array<{ name: string; length: number }> = [];
for (const entry of fs.readdirSync(agentsDir, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
const skillMd = path.join(agentsDir, entry.name, 'SKILL.md');
if (!fs.existsSync(skillMd)) continue;
const content = fs.readFileSync(skillMd, 'utf-8');
descriptions.push({ name: entry.name, length: extractDescription(content).length });
}

const total = descriptions.reduce((sum, d) => sum + d.length, 0);
const average = descriptions.length ? total / descriptions.length : 0;
const max = descriptions.reduce((m, d) => Math.max(m, d.length), 0);

expect(descriptions.length).toBeGreaterThan(0);
expect(total).toBeLessThanOrEqual(6000);
expect(average).toBeLessThanOrEqual(120);
expect(max).toBeLessThanOrEqual(240);
});

test('package.json version matches VERSION file', () => {
const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'));
const version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
Expand Down Expand Up @@ -1825,15 +1847,14 @@ describe('Codex generation (--host codex)', () => {
expect(codexResult.stdout.toString()).toBe(agentsResult.stdout.toString());
});

test('multiline descriptions preserved in Codex output', () => {
// office-hours has a multiline description — verify it survives the frontmatter transform
test('Codex output trims catalog description and preserves routing in body', () => {
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-office-hours', 'SKILL.md'), 'utf-8');
const fmEnd = content.indexOf('\n---', 4);
const frontmatter = content.slice(4, fmEnd);
// Description should span multiple lines (block scalar)
const descLines = frontmatter.split('\n').filter(l => l.startsWith(' '));
expect(descLines.length).toBeGreaterThan(1);
// Verify key phrases survived
expect(frontmatter).toContain('description: YC Office Hours');
expect(frontmatter).not.toContain('Proactively invoke this skill');
expect(content).toContain('## When to invoke this skill');
expect(content).toContain('Proactively invoke this skill');
expect(frontmatter).toContain('YC Office Hours');
});

Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /