Repository navigation
Add trade-intelligence skill (draft until MCP tools ship) - #7
Conversation
Add a shared trade-intelligence skill for competitor research, sourcing, and market trends from US ocean import bill-of-lading records since 2022. It calls the Terminal49 REST API through a bundled Python client, using an API key that the user saves in their own terminal (T49_API_KEY or ~/.t49_api_key). It never asks for a key in chat, and it sends accounts without trade intelligence to support@terminal49.com. The validator now checks every skill directory: frontmatter, a name that matches the folder, a description, and the bundled files each skill mentions. Bump the plugin to 0.2.0 and document both skills. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 457ccafc28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| set, ask the user to save theirs by running this in their own terminal (bash or zsh): | ||
|
|
||
| ```bash | ||
| printf 'Terminal49 API key: '; read -rs K; echo; (umask 077; touch ~/.t49_api_key; chmod 600 ~/.t49_api_key; printf %s "$K" > ~/.t49_api_key); unset K |
There was a problem hiding this comment.
Add native Windows credential setup
When the plugin runs under native Windows/PowerShell, the prescribed no-key recovery cannot work because read -rs, umask, chmod, and unset are Bash/Zsh syntax. Since this skill is shared by every supported client, Windows users who follow its instructions cannot configure the new feature without independently discovering a different secure setup; provide an OS-appropriate command or make the client handle credential storage portably.
AGENTS.md reference: AGENTS.md:L1-L3
Useful? React with 👍 / 👎.
Summary
Adds a second shared skill,
trade-intelligence, to the Terminal49 plugin. It answers market questions from US ocean import bill-of-lading records (every US ocean import since 2022, refreshed daily):The skill also tells the agent which caveats change an answer. Forwarders and brokers appear on the records. One company can show up under several names. Some importers withhold their names. The latest month is often partial, and values are estimates.
How it authenticates today
The skill calls the Terminal49 REST API through a bundled client,
scripts/ti.py, which needs only Python 3 with no extra dependencies. The client reads the user's Terminal49 API key fromT49_API_KEYor~/.t49_api_key. The user saves the key in their own terminal with a one-liner that works in bash and zsh. The skill follows the same credential rules ascontainer-tracking: it never asks for a key in chat and never prints one. Trade intelligence is enabled per account. Accounts without it get HTTP 403, and the skill tells the user to contact support@terminal49.com instead of retrying.Why this is a draft
Terminal49 MCP tools for trade intelligence are planned. When they ship, this skill will switch to them, so it authenticates through the same OAuth MCP connection as
container-trackingand no longer needs a local API key or the Python client. This PR stays a draft until then.Evaluation
The source skill went through two rounds of evaluation, comparing the skill against no skill on the same API. With the skill, the agent passed 24 of 25 checks; without it, 20 of 25. This PR adapts that skill to the repo's conventions without changing its guidance. The eval suite is not included here.
Changes
plugins/terminal49/skills/trade-intelligence/:SKILL.md,references/api.md, andscripts/ti.py. The skill name matches its folder. The setup wording follows thecontainer-trackingcredential rules, and the key-save command works in both bash and zsh.scripts/validate.mjsnow checks every skill directory:namethat matches its folder, and a descriptionreferences/…andscripts/…file a skill mentions existsAGENTS.md. The shared descriptions and keywords mention trade intelligence, and Codex'sinterfacecopy gets a matching default prompt.README.md,plugins/terminal49/README.md,AGENTS.md, andCONTRIBUTING.mdlist both skills and document the API-key setup.Validation
npm run validatepasses. A mutated copy of the repo fails with the expected errors when the skill name is wrong,references/api.mdorscripts/ti.pyis missing, or the guardrail text is removed.claude plugin validate plugins/terminal49andclaude plugin validate .both pass.ti.pyerror paths were checked: bad JSON, an unreachable host, and--help.scripts/ti.pycommand, and the key-save command could keep loose permissions on an existing key file.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.