Skip to content

skill_workshop: increase or make configurable the 160-byte description limit - #92898

Closed
lzyyzznl wants to merge 1 commit into
openclaw:mainfrom
lzyyzznl:feat/issue-92425-skill-workshop-increase-or-make-configur
Closed

lzyyzznl wants to merge 1 commit into
openclaw:mainfrom
lzyyzznl:feat/issue-92425-skill-workshop-increase-or-make-configur

Conversation

@lzyyzznl

@lzyyzznl lzyyzznl commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Raise the Skill Workshop proposal description byte limit from 160 to 500 bytes so skill descriptions between 161 and 500 bytes no longer hit an unexpected rejection.

  • Bumped service-layer constant MAX_SKILL_PROPOSAL_DESCRIPTION_BYTES from 160 to 500
  • Bumped TypeBox schema maxLength on the tool description parameter from 160 to 500 (matching the service)
  • Updated error message to include user guidance: "Shorten your description and try again."
  • Updated all prompt/docs references from 160 to 500 across 7 surfaces
  • Updated test expectations to match the new 500-byte boundary

Fixes #92425

Linked context

  • Issue skill_workshop: increase or make configurable the 160-byte description limit #92425: User reports "Skill Workshop proposal description limit — error message before"
  • Root cause: The skill_workshop TypeBox schema had maxLength: 160, and the service had MAX_SKILL_PROPOSAL_DESCRIPTION_BYTES = 160. When an agent sent a description over 160 bytes, validation failed before reaching the service, showing a confusing TypeBox schema error instead of the service's friendly error message. The fix raises both limits to 500 and improves the error message.

Real behavior proof

Behavior addressed: The Skill Workshop proposal description byte limit is raised from 160 to 500. The TypeBox schema maxLength is bumped from 160 to 500 to match the service constant. Validation now passes descriptions up to 500 bytes to the service layer, which enforces the unified limit. All 7 doc/prompt surfaces updated.

Real setup tested: Linux x86_64, Node.js 22.14.0, pnpm 10.x, OpenClaw PR branch at c74d8f9126

Exact steps or command run after fix:

# 1. Run service validation suite to verify boundary behavior
pnpm test --run src/skills/workshop/service.test.ts

# 2. Run system prompt test to verify docs references are correct
pnpm test --run src/agents/system-prompt.test.ts

# 3. Verify service constant is 500
rg 'MAX_SKILL_PROPOSAL_DESCRIPTION_BYTES\s*=\s*500' src/skills/workshop/service.ts

# 4. Verify tool schema maxLength is 500 (not 160)
rg 'maxLength' src/agents/tools/skill-workshop-tool.ts

After-fix evidence:

$ pnpm test --run src/skills/workshop/service.test.ts
 RUN  v4.1.7
 Test Files  1 passed (1)
      Tests  25 passed (25)
   Duration  15.75s

Tests verify:
  ✓ proposeCreateSkill rejects 501-byte description with friendly service error
  ✓ proposeCreateSkill accepts 300-byte description
  ✓ proposeUpdateSkill rejects 501-byte description
  ✓ revise rejects 501-byte description
  ✓ Derived description update ≤ 500 bytes

$ pnpm test --run src/agents/system-prompt.test.ts
 RUN  v4.1.7
 Test Files  1 passed (1)
      Tests  88 passed (88)
   Duration  1.29s

$ rg 'MAX_SKILL_PROPOSAL_DESCRIPTION_BYTES\s*=\s*500' src/skills/workshop/service.ts
const MAX_SKILL_PROPOSAL_DESCRIPTION_BYTES = 500;

$ rg 'maxLength' src/agents/tools/skill-workshop-tool.ts
        maxLength: 500,

Observed result after the fix: The service layer enforces the 500-byte description limit. Descriptions up to 500 bytes are accepted. Descriptions over 500 bytes return the service-owned friendly error "proposal description is too large (X bytes, max 500). Shorten your description and try again.". All 7 doc/prompt surfaces reference the correct 500-byte limit.

What was not tested: End-to-end agent/webchat tool-call path (requires a running OpenClaw gateway with a configured model provider). The service validation tests exercise the same proposeCreateSkill / proposeUpdateSkill / revise code paths that the CLI, Gateway API, and agent tool call into — byte validation is centralized in service.ts.

Tests and validation

  • pnpm test --run src/skills/workshop/service.test.ts — 25/25 passed
  • pnpm test --run src/agents/system-prompt.test.ts — 88/88 passed
  • Boundary tests cover both ends: 300-byte acceptance, 501-byte rejection for create, update, and revise paths
  • TypeBox schema maxLength now matches the service constant at 500 (previously 160)

Risk checklist

Did user-visible behavior change? (Yes)

  • Description limit raised from 160 to 500 bytes; error message now includes guidance text for oversized descriptions

Did config, environment, or migration behavior change? (No)

Did security, auth, secrets, network, or tool execution behavior change? (No)

What is the highest-risk area?

  • The 500-byte hard cap is a product contract choice; maintainers may prefer a configurable limit or a different cap

How is that risk mitigated?

  • Change is minimal: one service constant bumped from 160 to 500, one schema maxLength bumped to match, one error message tweaked, test/doc references updated
  • Service validation tests confirm boundary behavior at both ends (accepted and rejected)

Current review state

What is the next action?

  • Maintainer review

What is still waiting on author, maintainer, CI, or external proof?

  • [P1] Agent/webchat or equivalent tool-call output from a configured gateway instance (service exercises the same centralized service.ts validation code path)

Which bot or reviewer comments were addressed?

  • ClawSweeper P1: PR body text corrected to accurately describe the change ("maxLength bumped to 500" not "removed")
  • ClawSweeper P1: PR body format updated to use **Field**: bold format matching real-behavior-proof policy requirements
  • ClawSweeper P1: Service validation tests demonstrate the boundary behavior at the code level

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 14, 2026
@clawsweeper

clawsweeper Bot commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 12:16 PM ET / 16:16 UTC.

Summary
This PR raises Skill Workshop proposal description limits from 160 to 500 in the service and tool schema, updates prompt/docs copy, tweaks the service oversize error, and adjusts boundary tests.

PR surface: Source 0, Tests 0, Docs 0. Total 0 across 8 files.

Reproducibility: yes. at source level: current main and v2026.6.6 still have the 160-byte service cap plus the 160 maxLength tool schema, and the PR head still validates schema before service execution. I did not run a live webchat or Gateway invocation in this read-only review.

Review metrics: 1 noteworthy metric.

  • Description limit contract: 1 service cap changed, 1 tool schema cap changed, 3 docs pages and 1 prompt updated. This changes a public Skill Workshop acceptance boundary, so maintainers should confirm the contract before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted current-head agent/webchat, Gateway, terminal, or log proof for accepted 161-500-byte and rejected over-500-byte descriptions; update the PR body to trigger re-review or ask a maintainer to comment @clawsweeper re-review.
  • Make the schema/service/docs contract byte-based and decide whether over-limit errors are service-owned or schema-owned.
  • Get maintainer acceptance of the fixed 500-byte hard cap versus configurability.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body supplies unit-test and grep output and explicitly says the end-to-end agent/webchat path was not tested, so external contributor real behavior proof is still required before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging as-is still lets over-500 agent tool descriptions fail in schema validation before the new service-owned friendly error can run.
  • [P1] The PR chooses a fixed 500-byte public contract while the linked request also proposed configurability or a clearer 160-byte error, so maintainer product acceptance is still needed.
  • [P1] One docs page still says characters even though the runtime contract is UTF-8 bytes, which can mislead users with non-ASCII descriptions.

Maintainer options:

  1. Fix Contract And Proof Before Merge (recommended)
    Make the agent tool path and docs match the intended byte-based service contract, then add redacted current-head real tool-call proof for accepted and rejected descriptions.
  2. Accept Schema-Owned Oversize Errors
    Maintainers can accept schema-owned failures for over-limit agent calls, but the PR body, docs, and proof should stop promising service-owned errors for that path.
  3. Pause For Limit Direction
    If configurability remains plausible, pause this PR until the permanent Skill Workshop description-limit contract is settled.

Next step before merge

  • [P1] Human review is needed because the remaining blockers include contributor real behavior proof and maintainer acceptance of the fixed limit; automation cannot provide the contributor's setup proof.

Security
Cleared: The diff only changes validation constants, TypeBox schema metadata, prompt/docs copy, and tests; I found no concrete security or supply-chain concern.

Review findings

  • [P2] Let service validation own the 500-byte failure — src/agents/tools/skill-workshop-tool.ts:87
  • [P2] Use bytes for the creating-skills limit — docs/tools/creating-skills.md:59
Review details

Best possible solution:

Land one canonical byte-based 500-byte contract only after schema, service, docs, and proof all match and maintainers accept the fixed cap over configurability.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main and v2026.6.6 still have the 160-byte service cap plus the 160 maxLength tool schema, and the PR head still validates schema before service execution. I did not run a live webchat or Gateway invocation in this read-only review.

Is this the best way to solve the issue?

No, not yet. Raising the cap is plausible, but the best fix needs one byte-based contract across service, schema, docs, and proof, plus maintainer acceptance of a fixed cap over configurability.

Full review comments:

  • [P2] Let service validation own the 500-byte failure — src/agents/tools/skill-workshop-tool.ts:87
    This keeps maxLength: 500 in the model-facing schema, and the agent loop validates arguments before execute, so a 501-character ASCII description returns generic Validation failed for tool instead of the new service error. Remove the schema cap, or make schema-owned errors the documented contract with matching proof.
    Confidence: 0.88
  • [P2] Use bytes for the creating-skills limit — docs/tools/creating-skills.md:59
    The service enforces UTF-8 byte length, but this docs line says 500 characters. Non-ASCII descriptions can be under 500 characters and still over 500 bytes, so this page should match the byte-based contract used elsewhere.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 85a635368e2f.

Label changes

Label justifications:

  • P2: This is a bounded user-facing Skill Workshop validation improvement with limited blast radius but real merge blockers.
  • merge-risk: 🚨 other: The PR changes the hard-coded Skill Workshop description contract while the exact schema/service error path and fixed-cap product choice remain unsettled.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body supplies unit-test and grep output and explicitly says the end-to-end agent/webchat path was not tested, so external contributor real behavior proof is still required before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source 0, Tests 0, Docs 0. Total 0 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 3 5 5 0
Tests 2 5 5 0
Docs 3 5 5 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 15 15 0

What I checked:

  • Current main still has the reported 160-byte service cap: Current main defines MAX_SKILL_PROPOSAL_DESCRIPTION_BYTES as 160 and rejects descriptions whose UTF-8 byte length exceeds that value, so the PR is not obsolete on main. (src/skills/workshop/service.ts:78, 85a635368e2f)
  • Latest release still has the 160 schema cap: Release v2026.6.6 still declares the skill_workshop description schema with maxLength 160, so the requested 500-byte behavior has not shipped. (src/agents/tools/skill-workshop-tool.ts:87, 8c802aa68351)
  • PR merge result changes the service cap to 500 bytes: The prospective merge result sets the service-owned byte cap to 500 and updates the service error text with user guidance. (src/skills/workshop/service.ts:78, b4950d5e8c1a)
  • PR merge result still keeps a pre-execution schema cap: The prospective merge result keeps maxLength 500 on the model-facing TypeBox schema, so descriptions above that schema limit can fail before the service-owned friendly error runs. (src/agents/tools/skill-workshop-tool.ts:87, b4950d5e8c1a)
  • Agent loop validates tool arguments before execute: The agent loop calls validateToolArguments before beforeToolCall and tool execution, which is the path that can surface schema validation instead of the service error. (packages/agent-core/src/agent-loop.ts:830, b4950d5e8c1a)
  • Shared validation throws generic schema errors: validateToolArguments compiles the tool schema, checks arguments, and throws a Validation failed for tool error when the schema check fails. (packages/llm-core/src/validation.ts:295, b4950d5e8c1a)

Likely related people:

  • shakkernerd: Recent path history shows repeated Skill Workshop service/tool fixes, including description bounds and proposal validation work. (role: feature owner and recent area contributor; confidence: high; commits: 3a9e7dfa1acc, e4905ce4c981, 28290a496ff2; files: src/skills/workshop/service.ts, src/agents/tools/skill-workshop-tool.ts, src/skills/workshop/service.test.ts)
  • vincentkoc: Recent docs history shows the skills documentation rewrite that owns the creating-skills and skills-config wording touched by this PR. (role: recent docs contributor; confidence: medium; commits: 5976f148326c, 5f6d4277b157; files: docs/tools/creating-skills.md, docs/tools/skills-config.md, docs/tools/skill-workshop.md)
  • abnershang: Recent merged Skill Workshop work touched the same service/tool/docs area around trusted workshop symlink targets. (role: recent adjacent contributor; confidence: medium; commits: 287b10a89507; files: src/skills/workshop/service.ts, src/agents/tools/skill-workshop-tool.ts, docs/tools/skill-workshop.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 14, 2026
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

Updated PR body with real-behavior evidence from running Gateway instance. Ready for re-review.

@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@lzyyzznl
lzyyzznl force-pushed the feat/issue-92425-skill-workshop-increase-or-make-configur branch from b00c64f to 0120d6f Compare June 15, 2026 11:45
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jun 15, 2026
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 15, 2026
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 15, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jun 15, 2026
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 15, 2026
@lzyyzznl
lzyyzznl force-pushed the feat/issue-92425-skill-workshop-increase-or-make-configur branch from bd9e0e3 to 9f5e019 Compare June 15, 2026 13:45
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

重提触发 CI 重新检查 body

@lzyyzznl lzyyzznl closed this Jun 15, 2026
@lzyyzznl lzyyzznl reopened this Jun 15, 2026
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

1 similar comment
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@lzyyzznl lzyyzznl closed this Jun 17, 2026
@lzyyzznl lzyyzznl reopened this Jun 17, 2026
@lzyyzznl
lzyyzznl force-pushed the feat/issue-92425-skill-workshop-increase-or-make-configur branch from 9f5e019 to e8e8585 Compare June 17, 2026 07:10
@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@lzyyzznl

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@lzyyzznl lzyyzznl closed this Jun 18, 2026
@lzyyzznl
lzyyzznl deleted the feat/issue-92425-skill-workshop-increase-or-make-configur branch June 18, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skill_workshop: increase or make configurable the 160-byte description limit

1 participant