Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/langhuihui/gotask/taskgit clone --depth 1 https://github.com/langhuihui/gotaskWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02425 | $0.02425 |
| Opus 5 | $0.01213 | $0.01213 |
| Sonnet 5 | $0.00485 | $0.00485 |
| Haiku 4.5 | $0.00243 | $0.00243 |
Grade A, and why
task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 387 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeBuddy (Tencent) Rules for GoTask Project
Project Context
GoTask is an asynchronous task management framework for Go that implements an "Everything is a Task" philosophy. It provides OS-like task manager capabilities with precise control over different granularity levels of system components.
Core Architectural Principles
1. Single Goroutine Event Loop (CRITICAL)
- NEVER create goroutines directly in task implementations
- All child tasks execute sequentially in the parent task's goroutine
- This eliminates race conditions and ensures predictable execution
- Use
parent.AddTask(child)instead ofgo func()
2. Task Hierarchy and Lifecycle
- Tasks form a tree structure with parent-child relationships
- Each task has a unique ID for tracking and management
- Use
RootManageras the root task manager for signal handling - Implement proper
Start(),Run(), andDispose()methods
3. Resource Management Philosophy
- Framework handles cascading disposal automatically
- Use
OnStop()andOnDispose()hooks for cleanup - Implement graceful shutdown patterns
- Never call
Start()directly - it must be called by the parent task
Task Type System
task.Task (Base Task)
- Use for simple, single-purpose tasks
- Basic task implementation with lifecycle methods
task.Job (Container Task)
- Can contain child tasks
- Ends when all child tasks complete
- Use for task coordinators and containers
task.Work (Persistent Task)
- Similar to Job but continues after children complete
- Use for background workers and long-running services
task.TickTask (Periodic Task)
- Executes at regular intervals
- Implement
GetTickInterval() time.Duration - Use for timers, heartbeats, cleanup tasks
task.ChannelTask (Event-Driven Task)
- Custom signal-based tasks
- Override
GetSignal()method - Use for event-driven and reactive tasks
Implementation Patterns
Standard Task Template
type MyTask struct {
task.Task // Choose appropriate type
// Task-specific fields
Name string
Config map[string]interface{}
Resources []Resource
}
func (t *MyTask) Start() error {
// Resource initialization
t.Info("Task starting", "name", t.Name, "taskId", t.GetID())
// Add resource dependencies
t.Using(t.Resources...)
// OnStop: 用于关闭阻塞性资源(如端口监听、网络连接)
t.OnStop(func() {
// 关闭阻塞性资源,如 server.Close(), conn.Close()
server.Close()
})
// OnDispose: 用于清理非阻塞性资源
t.OnDispose(func() {
// 清理其他资源,如缓存、文件句柄等
cache.Flush()
})
return nil
}
func (t *MyTask) Run() error {
// Main task logic (blocking)
for !t.IsStopped() {
// Do work
if err := t.doWork(); err != nil {
return err
}
}
return t.StopReason()
}
func (t *MyTask) Dispose() {
// Resource cleanup
t.Info("Task disposing", "name", t.Name)
for _, resource := range t.Resources {
resource.Close()
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 387 lines · 2,425 tokens per session scan A 83b75fb8125e
task is a cursor rule published in the GitHub repository langhuihui/gotask (77 stars, last pushed 11d ago), licensed MIT. It adds 2,425 tokens to every session, about $0.0121 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.