Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Cursor rules for Hashgraph Online development with TypeScript, building AI agents on Hedera with RegistryBrokerClient.
.claude/skills/amariahak-cursor-rules-for-hashgraph-online-development-with-typescript-building-ai-agent/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 29% | 0% |
Cursor rules for Hashgraph Online development with TypeScript, building AI agents on Hedera with RegistryBrokerClient.
Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/hol-hedera-typescript-cursorrules-prompt-file.mdc.
You are an expert TypeScript developer building applications with Hashgraph Online (HOL) - the open-source SDK for AI agents and decentralized applications on Hedera.
Core:
HOL SDK:
Frontend (when applicable):
any - define proper interfacesas any casting - use type guardsregistry-client.ts, topic-manager.ts__tests__/registry-client.test.tsregistry-browser.tsxrenderContent()typescriptimport { RegistryBrokerClient } from '@hashgraphonline/standards-sdk'; const client = new RegistryBrokerClient({ baseUrl: 'https://api.hol.org', apiKey: process.env.HOL_API_KEY, });
typescriptimport { RegistryBrokerClient, SearchParams, Logger } from '@hashgraphonline/standards-sdk'; const logger = new Logger({ module: 'AgentSearch', level: 'info' }); const client = new RegistryBrokerClient(); const searchParams: SearchParams = { q: 'weather', registry: 'hcs-10', limit: 10, page: 1, }; const results = await client.search(searchParams); logger.info('Search completed', { total: results.total }); results.hits.forEach(agent => { logger.debug('Agent found', { name: agent.name, description: agent.description }); });
typescriptimport { RegistryBrokerClient, Logger } from '@hashgraphonline/standards-sdk'; const client = new RegistryBrokerClient(); const logger = new Logger({ module: 'AgentResolver', level: 'info' }); const agent = await client.resolveUaid('hcs10://0.0.123456/agent-name'); logger.info('Agent resolved', { name: agent.name, protocols: agent.protocols, capabilities: agent.capabilities });
typescriptimport { RegistryBrokerClient, AgentRegistrationRequest, Logger } from '@hashgraphonline/standards-sdk'; const client = new RegistryBrokerClient(); const logger = new Logger({ module: 'AgentRegistration', level: 'info' }); const registration: AgentRegistrationRequest = { name: 'My Agent', description: 'A helpful AI agent', protocols: ['hcs-10'], capabilities: ['chat', 'search'], endpoint: 'https://my-agent.example.com', }; const response = await client.registerAgent(registration, { autoTopUp: { accountId: process.env.HEDERA_OPERATOR_ID!, privateKey: process.env.HEDERA_OPERATOR_KEY!, }, }); if (response.success) { logger.info('Agent registered', { uaid: response.uaid }); }
typescriptimport { RegistryBrokerClient, StartChatOptions, Logger } from '@hashgraphonline/standards-sdk'; const client = new RegistryBrokerClient(); const logger = new Logger({ module: 'AgentChat', level: 'info' }); const options: StartChatOptions = { uaid: 'hcs10://0.0.123456/agent-name', auth: { accountId: process.env.HEDERA_OPERATOR_ID!, privateKey: process.env.HEDERA_OPERATOR_KEY!, }, }; const conversation = await client.chat.start(options); const response = await conversation.send({ plaintext: 'Hello, can you help me?', }); logger.info('Agent response received', { sessionId: conversation.sessionId });
typescriptimport { RegistryBrokerClient, Logger } from '@hashgraphonline/standards-sdk'; const client = new RegistryBrokerClient(); const logger = new Logger({ module: 'RegistryStats', level: 'info' }); const stats = await client.stats(); logger.info('Registry stats', { totalAgents: stats.totalAgents, protocols: stats.protocols }); const registries = await client.registries(); registries.forEach(r => logger.debug('Registry', { name: r.name }));
typescriptimport { RegistryBrokerClient, VectorSearchRequest, Logger } from '@hashgraphonline/standards-sdk'; const client = new RegistryBrokerClient(); const logger = new Logger({ module: 'VectorSearch', level: 'info' }); const request: VectorSearchRequest = { query: 'find me an agent that can help with weather forecasts', limit: 5, filter: { registry: 'hcs-10', protocols: ['a2a'], }, }; const results = await client.vectorSearch(request); results.hits.forEach(hit => { logger.info('Match found', { name: hit.agent.name, score: hit.score }); });
typescriptdescribe('RegistryBrokerClient', () => { let client: RegistryBrokerClient; beforeEach(() => { client = new RegistryBrokerClient(); }); describe('search', () => { it('should return agents matching query', async () => { const result = await client.search({ q: 'test' }); expect(result.hits).toBeDefined(); expect(Array.isArray(result.hits)).toBe(true); }); }); describe('resolveUaid', () => { it('should resolve valid UAID', async () => { const agent = await client.resolveUaid('hcs10://0.0.123456/test'); expect(agent.name).toBeDefined(); }); }); });
bashpnpm test # Run all tests pnpm test -- --watch # Watch mode pnpm test -- --coverage # Coverage report pnpm test -- -t "pattern" # Run specific tests
Before completing any task:
pnpm run lint - Zero violationspnpm run typecheck - Zero errors pnpm run build - Must compilepnpm test - All tests passtypescriptimport 'dotenv/config'; const config = { baseUrl: process.env.HOL_API_URL || 'https://api.hol.org', apiKey: process.env.HOL_API_KEY, network: process.env.HEDERA_NETWORK || 'testnet', operatorId: process.env.HEDERA_OPERATOR_ID, operatorKey: process.env.HEDERA_OPERATOR_KEY, };
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 23,222 | 13,480 | -42% | 1 | 1 | 0% | 5,092 | 5,253 | +3% | 0 | 0 | — |
case-02 | fail→pass | 22,141 | 10,724 | -52% | 1 | 1 | 0% | 3,820 | 4,513 | +18% | 0 | 0 | — |
case-03 | fail→fail | 16,134 | 12,323 | -24% | 1 | 1 | 0% | 3,662 | 4,755 | +30% | 0 | 0 | — |
case-04 | pass→pass | 12,082 | 9,537 | -21% | 1 | 1 | 0% | 2,497 | 4,159 | +67% | 0 | 0 | — |
case-05 | pass→pass | 10,109 | 10,539 | +4% | 1 | 1 | 0% | 2,281 | 4,377 | +92% | 0 | 0 | — |
case-06 | pass→fail | 13,865 | 12,810 | -8% | 1 | 1 | 0% | 2,851 | 4,934 | +73% | 0 | 0 | — |
case-07 | fail→pass | 23,716 | 8,526 | -64% | 1 | 1 | 0% | 3,917 | 3,971 | +1% | 0 | 0 | — |
case-08 | fail→pass | 13,758 | 8,475 | -38% | 1 | 1 | 0% | 2,720 | 3,922 | +44% | 0 | 0 | — |
case-09 | fail→pass | 12,262 | 4,754 | -61% | 1 | 1 | 0% | 2,337 | 3,025 | +29% | 0 | 0 | — |
case-10 | fail→pass | 13,074 | 13,254 | +1% | 1 | 1 | 0% | 2,815 | 3,686 | +31% | 0 | 0 | — |
case-11 | fail→pass | 15,177 | 8,482 | -44% | 1 | 1 | 0% | 3,038 | 3,962 | +30% | 0 | 0 | — |
case-12 | fail→pass | 26,647 | 15,823 | -41% | 1 | 1 | 0% | 4,508 | 5,924 | +31% | 0 | 0 | — |
case-13 | fail→pass | 10,399 | 6,737 | -35% | 1 | 1 | 0% | 1,901 | 3,480 | +83% | 0 | 0 | — |
case-14 | fail→pass | 20,464 | 16,142 | -21% | 1 | 1 | 0% | 4,439 | 5,876 | +32% | 0 | 0 | — |
case-15 | fail→pass | 22,596 | 20,621 | -9% | 1 | 1 | 0% | 4,943 | 6,937 | +40% | 0 | 0 | — |
case-16 | pass→pass | 14,115 | 13,527 | -4% | 1 | 1 | 0% | 2,770 | 4,916 | +77% | 0 | 0 | — |
case-17 | fail→fail | 15,825 | 9,849 | -38% | 1 | 1 | 0% | 3,211 | 4,281 | +33% | 0 | 0 | — |
case-18 | fail→pass | 6,948 | 1,160 | -83% | 1 | 1 | 0% | 1,164 | 2,240 | +92% | 0 | 0 | — |
case-19 | fail→pass | 14,811 | 3,854 | -74% | 1 | 1 | 0% | 2,727 | 2,645 | -3% | 0 | 0 | — |
case-20 | fail→pass | 7,585 | 1,842 | -76% | 1 | 1 | 0% | 1,401 | 2,385 | +70% | 0 | 0 | — |
case-21 | fail→pass | 4,122 | 2,950 | -28% | 1 | 1 | 0% | 682 | 2,596 | +281% | 0 | 0 | — |
case-22 | pass→pass | 3,853 | 2,307 | -40% | 1 | 1 | 0% | 649 | 2,313 | +256% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.