ts
Use this rule for smart contract testing, scripting, and interaction with TON blockchain using TypeScript, Blueprint, and Sandbox. Always apply it when developing TypeScript code for TON.
Install / Use
npx skills add ton-ai-core/contract-knowledgeInstalls into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
LegalSupported Platforms
Our assessment of ts
ts scores 64/100 on our quality scale, 200th of 216 Legal skills we index.
Its Cursor Rules is 4.3 KB long, well organised into 11 sections with 3 code examples: a solid amount of guidance for an agent.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 15 months ago. Expect some instructions to reference tool versions or APIs that have since changed.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-20. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ts compared with similar skills
All 4 of these similar skills score higher than ts; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ts (this skill)by ton-ai-core | 64 | 0 | 15mo ago | Cursor Rules |
| headroomby headroomlabs-ai | 100 | 76.3k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 77.2k | today | MCP Server |
| constraint-driven-developmentby addyosmani | 100 | 108.2k | 6d ago | SKILL.md |
| ad-creativeby coreyhaines31 | 100 | 55.4k | 4d ago | SKILL.md |
Frequently asked questions
- How do I install ts?
- Run
npx skills add ton-ai-core/contract-knowledge. The install tabs above show the steps for each supported agent. - Which AI agents does ts work with?
- It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
- Is ts safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ts still maintained?
- The repository was last updated about 15 months ago. Expect some instructions to reference tool versions or APIs that have since changed.
Skill content
View source on GitHubdescription: Use this rule for smart contract testing, scripting, and interaction with TON blockchain using TypeScript, Blueprint, and Sandbox. Always apply it when developing TypeScript code for TON. globs: *.ts alwaysApply: false
🚀 TypeScript — Blueprint — Sandbox (AGI Strict Protocol)
🎯 Core Principles (Mandatory)
-
Explicitness & Precision:
- No implicit types (
anystrictly forbidden). - Zero ESLint warnings/errors tolerated.
- Immediately fix autogenerated Jest issues (type mismatches, serialization errors).
- No implicit types (
-
Property-Based Testing (fast-check) Dominance:
- Prioritize fast-check property tests alongside standard Jest unit tests.
- Clearly define ≥5 invariant properties per key functionality.
- Immediately add targeted unit tests for historically problematic edge-cases.
-
Total Autonomy:
- Proactively resolve technical issues. Never defer, never suppress.
✅ Essential Workflow
1. Contract & Wrapper Generation
- Contract per file (
contracts/) in strict PascalCase naming. - Wrappers auto-generated (
npx blueprint build --all) for Tact only (manual wrapper rules:func.mdc,fift.mdc,tolk.mdc).
2. Mandatory Testing Strategy
- Combine Jest units, fast-check properties, and fuzz tests explicitly in
tests/. - Example structure (
tests/prop/MyContract.pbt.ts):
import { testProp, fc } from 'fast-check';
import { logicFn } from '../../wrappers/MyContract';
fc.configureGlobal({ numRuns: 200 });
testProp('encode/decode symmetry', [fc.string()], (s) => {
expect(decode(encode(s))).toBe(s);
});
testProp('balance invariant', [account()], (acc) => {
expect(update(acc).balance).toBeGreaterThanOrEqual(0);
});
// At least 5 robust property tests per module/functionality
- Property tests mandatory. Every logic change demands new properties or validation.
3. Sandbox Testing Discipline
- Consistent initialization pattern (
@ton/sandbox):
import { Blockchain, SandboxContract } from '@ton/sandbox';
import { MyContract } from '../wrappers/MyContract';
let blockchain: Blockchain;
let wallet: SandboxContract;
let contract: SandboxContract<MyContract>;
beforeEach(async () => {
blockchain = await Blockchain.create();
wallet = await blockchain.treasury('wallet');
contract = blockchain.openContract(await MyContract.fromInit(wallet.address));
await contract.sendDeploy(wallet.getSender(), toNano('0.05'));
});
- Strict state verification: explicitly verify transactions (
toHaveTransaction).
🧪 Strict Code Quality Enforcement
- ESLint Compliance: enforce
eslint --fix; zero warnings/errors. - Explicit Handling of Promises & Async: always await explicitly.
- Logging Discipline: use with always
console.logwith testing code.
📜 Script Crafting Discipline
- Explicit Entry Structure (PascalCase naming):
import { NetworkProvider } from '@ton-ai-core/blueprint';
export async function run(provider: NetworkProvider, args: string[]) {
const ui = provider.ui();
const contractAddress = args[0] || await ui.input('Contract Address:');
const contract = provider.open(MyContract.fromAddress(contractAddress));
// Explicit business logic handling here
}
- Secure Handling: Sensitive config strictly from
.env. Explicit, informative errors mandatory.
🚨 Troubleshooting Autonomy
Immediately resolve:
- Deployment checks (
provider.isContractDeployed()) - Jest timeouts (always use explicit awaits
blockchain.run()) - ESLint compliance (explicit awaits)
- Snapshot serialization (explicit
.toString()for BigInt)
No temporary suppressions; solve permanently.
♻️ Rollback Enforcement (Mandatory)
- Any test/property/fuzz failure immediately triggers rollback to Contract Coding or Tests. Zero tolerance policy.
📌 Checklist (Must be TRUE for every merge/deploy)
- [ ] ESLint — 0 warnings/errors
- [ ] Jest — 100% coverage, no failures
- [ ] Property-based tests (fast-check) ≥5 invariants per key module
- [ ] Sandbox transactions explicitly verified
- [ ] All autogenerated issues resolved immediately
- [ ] Scripts — Explicit, secure
.env, informative errors - [ ] Autonomy — Zero placeholders, zero suppressions, zero manual interventions
This document is mandatory under AGI strict protocol. No deviations permitted.
Related Skills
headroom
76.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
77.2k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
constraint-driven-development
108.2kEstablishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-i…
ad-creative
55.4kWhen the user wants to generate, iterate, or scale ad creative — headlines, descriptions, primary text, or full ad variations — for any paid advertising platform.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
