Testing Your Component Locally Before Submitting

Don't wait for the build pipeline to tell you something's broken. Test locally first — validate your manifest, run your skill in the sandbox, and catch issues before they cost you a build cycle.

Validate Your Manifest

lsai-cli skill config validate

This checks your skill.json for:

  • Missing required fields
  • Invalid field types
  • Schema syntax errors
  • Setup step references to non-existent fields
  • Version format issues

Fix everything this reports before submitting.

Install Locally

lsai-cli component install ./my-skill

This installs your skill into the local agent's skill directory, exactly as the marketplace would. The agent picks it up, registers it, and you can invoke it immediately.

Check it registered:

lsai-cli component list

Test Your Skill Manually

Send a request to your skill directly:

echo '{"operation":"my_operation","payload":{"key":"value"}}' | node dist/index.js

You should get a JSON response on stdout. If you get nothing, check:

  • Is your skill reading from stdin?
  • Is it writing to stdout (not stderr)?
  • Is the output valid JSON?
  • Does it include a status field?

Test Validation Commands

If your skill has setup steps with validation_command:

lsai-cli skill config test-validation \
  --step credentials \
  --values '{"api_key": "test-key-123"}'

This invokes your skill with the validation operation and shows you exactly what the user would see — success message or error.

Run in the Sandbox

The SDK includes a sandbox runner that applies the same restrictions the agent uses:

cargo run --bin sandbox-runner -- --manifest path/to/manifest.toml

This spawns your skill with:

  • Cleared environment (only PATH + declared env vars)
  • Restricted filesystem access
  • Output size limits
  • Timeout enforcement

If your skill works outside the sandbox but fails inside it, you're probably:

  • Reading environment variables that aren't declared
  • Accessing filesystem paths that aren't allowed
  • Producing output larger than 1MB
  • Taking longer than 30 seconds

Validate Build Config

lsai-cli config validate

Checks your lifesavor-build.yml for syntax errors, missing fields, and invalid values before you push.

Check Submission Readiness

lsai-cli components status <component-id>

This shows you exactly what's missing before submission: description, category, tags, connected repo, etc. Fix everything in the checklist before running submit.

Common Issues

"Skill has no entrypoint defined" — Your skill.json is missing the entrypoint block.

"Failed to parse skill response as JSON" — Your skill is writing something other than JSON to stdout. Check for debug prints, logging to stdout, or missing newlines.

"Skill execution timed out" — Your skill took longer than 30 seconds. Optimize or increase your execution tier.

"Output exceeded 1MB limit" — Your skill is returning too much data. Paginate, summarize, or stream.

"Process exited with code 1" — Your skill crashed. Run it manually with the same input to see the error.

Test locally, fix locally, then push. Your build success rate will thank you.