Skip to content

[noskills] init command generates invalid "tools" string format for OpenCode agents #129

@salihdev0

Description

@salihdev0

Bug Description

When running the noskills init command and selecting OpenCode as a coding tool, the generated markdown agent files (e.g., .opencode/agents/noskills-executor.md) are created with an invalid YAML frontmatter.

Specifically, the tools field is generated as a comma-separated string (tools: read, write, glob, grep, shell, delegate). OpenCode's schema validation strictly expects the tools field to be either an object or undefined. Because of this generated string, OpenCode crashes with a validation error when trying to run the agent.

The noskills init template for OpenCode needs to be updated to output an object format or omit the tools field if undefined is acceptable.

Steps to Reproduce

  1. Run the initialization command: npx eser@latest noskills init
  2. When prompted for coding tools, select OpenCode (along with any others).
◇  No coding tools detected. Which tools do you use? (space to toggle) · Claude Code, OpenCode, Codex CLI
  1. Complete the init process.
  2. Try to run the generated OpenCode agent.
  3. The OpenCode CLI will crash due to schema validation failure.

Expected Behavior

The noskills init command should generate OpenCode agent files with a valid tools object structure in the frontmatter, ensuring it is compatible with OpenCode's parser.

For example, instead of:

tools: read, write, glob, grep, shell, delegate

It should generate:

tools:
  read: true
  write: true
  glob: true
  grep: true
  shell: true
  delegate: true

(Or whatever the correct object mapping is, or omit it entirely if no specific tool configuration is required).

Actual Behavior

The init command generates a string for the tools field. When OpenCode attempts to run it, it throws the following error:

Configuration is invalid at /Users/ssi/projects/vesta/zenith/.opencode/agents/noskills-executor.md
↳ Expected object | undefined, got "read, write, glob, grep, shell, delegate" tools

Runtime

Node.js

Package Version

eser@latest noskills

Runtime Version

24

Additional Context

Here is the console output from the initialization process that caused the issue:

npx eser@latest noskills init
┌  noskills init
│
◇  Config: .eser/          
◇  Project scanned      
◇    go
│
◇  0 coding tool(s) detected 
│
◇  No coding tools detected. Which tools do you use? (space to toggle) · Claude Code, OpenCode, Codex CLI
│
◇  3 provider(s) detected    
│
◇  What kind of project is this? (space to toggle, enter to confirm) · Beautiful Product, Long-Lived, Compliance, Well-Engineered
✓  Concerns: beautiful-product, long-lived, compliance, well-engineered
│
◇  Synced 4 tool(s)      
◇    claude-code
◇    opencode
◇    codex
◇    hooks
│
└  Done. 3 tool(s), 3 provider(s), 4 concern(s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions