Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .agents/skills/sunhat
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dist/extendedArtifactsTron/",
"extendedArtifactsTron/",
"src/",
"skills/",
"types.ts",
"LICENSE",
"README.md",
Expand Down
8 changes: 4 additions & 4 deletions skills/sunhat/SKILL.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 4 additions & 0 deletions skills/sunhat/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -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."
6 changes: 4 additions & 2 deletions skills/sunhat/workflows/sunhat-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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/<network>/`
Loading