diff --git a/.agents/skills/sunhat b/.agents/skills/sunhat new file mode 120000 index 0000000..2f4e963 --- /dev/null +++ b/.agents/skills/sunhat @@ -0,0 +1 @@ +../../skills/sunhat \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6712e05..c86fcd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [Unreleased] + +### Added +- Codex CLI and IDE skill discovery through `.agents/skills/sunhat`. +- Codex skill metadata, invocation guidance, and npm packaging for `skills/sunhat`. + ## [1.5.0] - 2026-01-21 ### Added diff --git a/README.md b/README.md index 519c25c..e0228c3 100644 --- a/README.md +++ b/README.md @@ -233,11 +233,20 @@ skills/ | IDE | Setup | |-----|-------| +| **Codex CLI / IDE** | Use `.agents/skills/sunhat`; this repository includes the discovery link. Invoke with `$sunhat` or let Codex select it automatically. | | **Claude Code** | Place `skills/sunhat` in project root. Claude auto-discovers `SKILL.md`. | | **Google Antigravity** | Place `skills/sunhat` in `.agent/skills/sunhat`. Antigravity auto-discovers `SKILL.md`. | | **OpenCode** | Place `skills/sunhat` in `.opencode/skills/sunhat`. OpenCode auto-discovers `SKILL.md`. | | **Cursor** | Copy `SKILL.md` content into `.cursorrules` or reference workflow paths. | +### Codex Setup + +Codex discovers repository-scoped skills from `.agents/skills`. This repository maps `.agents/skills/sunhat` to the canonical `skills/sunhat` directory, so Codex CLI and the Codex IDE extension load the skill automatically when opened from this repository. + +For a project with a local `@sun-protocol/sunhat` dependency, copy `node_modules/@sun-protocol/sunhat/skills/sunhat` to `.agents/skills/sunhat`. You can also ask Codex to install the skill from this repository with `$skill-installer`. + +Run `/skills` to confirm discovery, then invoke the skill explicitly with `$sunhat` or describe a matching Sunhat task. See the [official Codex Skills documentation](https://developers.openai.com/codex/skills/) for discovery and installation details. + ### Example Usage ``` @@ -246,6 +255,9 @@ skills/ # Antigravity > "Deploy the Token contract to Nile testnet." + +# Codex +> "$sunhat compile and test this TRON project." ``` The AI agent will discover the skill, read the appropriate workflow, and execute the task deterministically. diff --git a/package.json b/package.json index 701dfd0..2134be7 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "dist/extendedArtifactsTron/", "extendedArtifactsTron/", "src/", + "skills/", "types.ts", "LICENSE", "README.md", diff --git a/skills/sunhat/SKILL.md b/skills/sunhat/SKILL.md index 855cf40..c774137 100644 --- a/skills/sunhat/SKILL.md +++ b/skills/sunhat/SKILL.md @@ -1,13 +1,13 @@ --- -name: Sunhat TRON Development -description: The official detailed guide for developing, testing, deploying, and auditing TRON smart contracts using the Sunhat toolkit. +name: sunhat +description: Initialize, compile, test, deploy, or audit TRON smart contract projects that use the Sunhat Hardhat plugin. --- # Sunhat TRON Development Skill -This skill enables you to develop, test, and deploy smart contracts on the TRON network. +Use this skill to operate the Sunhat lifecycle for TRON smart contracts. -**Rule:** Do not memorize the details of every task. Only read the specific workflow file relevant to your current objective. +**Rule:** Read only the workflow file relevant to the current objective. If the request spans multiple objectives, read the required workflows in execution order. ## Capabilities diff --git a/skills/sunhat/agents/openai.yaml b/skills/sunhat/agents/openai.yaml new file mode 100644 index 0000000..52e62be --- /dev/null +++ b/skills/sunhat/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Sunhat TRON Development" + short_description: "Build, test, deploy, and audit TRON contracts with Sunhat" + default_prompt: "Use $sunhat to inspect this project and run the appropriate TRON smart contract workflow." diff --git a/skills/sunhat/workflows/sunhat-deploy.md b/skills/sunhat/workflows/sunhat-deploy.md index dc55c7a..b04c47d 100644 --- a/skills/sunhat/workflows/sunhat-deploy.md +++ b/skills/sunhat/workflows/sunhat-deploy.md @@ -9,8 +9,9 @@ I will help you deploy your contracts to the Tron network (Mainnet, Nile, Shasta ## Guardrails - **CRITICAL**: Ensure `deployTron/` folder exists (Sunhat convention) -- Verify `TRON_RPC_URL` and `PRIVATE_KEY` are in `.env` +- Verify `TRON_RPC_URL` and `PRIVATE_KEY` are configured without printing their values - Ensure `network: tron` is configured in `hardhat.config.ts` +- Before broadcasting, show the target network, deployer address, selected tags, and exact command, then obtain explicit user confirmation ## Steps @@ -49,4 +50,5 @@ _Optional: Add `--tags [Tag]` to run specific scripts._ ### 4. Verify Output - Check console logs for "deployed at" address -- Note the address for verification +- Record the transaction hash and deployed address for verification +- Check the corresponding deployment artifact under `deployments//`