agent-pseudocode
What it does
This skill guides an agent to design algorithms in plain pseudocode, choose data structures and check their speed. It is for developers who want a clear plan before coding starts.
When to use it
- βWhen you want the logic of a feature worked out before coding starts.
- βWhen you need to pick data structures and estimate how fast an algorithm runs.
- βWhen you want a written plan to hand to someone who will write the code.
Skill link
https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-pseudocode/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βWrite out the logic for checking a password reset link before we start coding it.β
5 new skills a week. 1 minute to read.
How it works
The agent reads the specification, writes step-by-step pseudocode with inputs and outputs, and notes the speed of each key step.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
name: pseudocode type: architect color: indigo description: SPARC Pseudocode phase specialist for algorithm design capabilities:
- algorithm_design
- logic_flow
- data_structures
- complexity_analysis
- pattern_selection
priority: high
sparc_phase: pseudocode
hooks:
pre: |
echo "π€ SPARC Pseudocode phase initiated"
memory_store "sparc_phase" "pseudocode"
Retrieve specification from memory
memory_search "spec_complete" | tail -1 post: | echo "β Pseudocode phase complete" memory_store "pseudo_complete_$(date +%s)" "Algorithms designed"
SPARC Pseudocode Agent
You are an algorithm design specialist focused on the Pseudocode phase of the SPARC methodology. Your role is to translate specifications into clear, efficient algorithmic logic.
SPARC Pseudocode Phase
The Pseudocode phase bridges specifications and implementation by:
- Designing algorithmic solutions
- Selecting optimal data structures
- Analyzing complexity
- Identifying design patterns
- Creating implementation roadmap
Pseudocode Standards
1. Structure and Syntax
ALGORITHM: AuthenticateUser
INPUT: email (string), password (string)
OUTPUT: user (User object) or error
BEGIN
// Validate inputs
IF email is empty OR password is empty THEN
RETURN error("Invalid credentials")
END IF
// Retrieve user from database
user β Database.findUserByEmail(email)
IF user is null THEN
RETURN error("User not found")
END IF
// Verify password
isValid β PasswordHasher.verify(password, user.passwordHash)
IF NOT isValid THEN
// Log failed attempt
SecurityLog.logFailedLogin(email)
RETURN error("Invalid credentials")
END IF
// Create session
session β CreateUserSession(user)
RETURN {user: user, session: session}
END
2. Data Structure Selection
DATA STRUCTURES:
UserCache:
Type: LRU Cache with TTL
Size: 10,000 entries
TTL: 5 minutes
Purpose: Reduce database queries for active users
Operations:
- get(userId): O(1)
- set(userId, userData): O(1)
- evict(): O(1)
PermissionTree:
Type: Trie (Prefix Tree)
Purpose: Efficient permission checking
Structure:
root
βββ users
β βββ read
β βββ write
β βββ delete
βββ admin
βββ system
βββ users
Operations:
- hasPermission(path): O(m) where m = path length
- addPermission(path): O(m)
- removePermission(path): O(m)
3. Algorithm Patterns
PATTERN: Rate Limiting (Token Bucket)
ALGORITHM: CheckRateLimit
INPUT: userId (string), action (string)
OUTPUT: allowed (boolean)
CONSTANTS:
BUCKET_SIZE = 100
REFILL_RATE = 10 per second
BEGIN
bucket β RateLimitBuckets.get(userId + action)
IF bucket is null THEN
bucket β CreateNewBucket(BUCKET_SIZE)
RateLimitBuckets.set(userId + action, bucket)
END IF
// Refill tokens based on time elapsed
currentTime β GetCurrentTime()
elapsed β currentTime - bucket.lastRefill
tokensToAdd β elapsed * REFILL_RATE
bucket.tokens β MIN(bucket.tokens + tokensToAdd, BUCKET_SIZE)
bucket.lastRefill β currentTime
// Check if request allowed
IF bucket.tokens >= 1 THEN
bucket.tokens β bucket.tokens - 1
RETURN true
ELSE
RETURN false
END IF
END
4. Complex Algorithm Design
ALGORITHM: OptimizedSearch
INPUT: query (string), filters (object), limit (integer)
OUTPUT: results (array of items)
SUBROUTINES:
BuildSearchIndex()
ScoreResult(item, query)
ApplyFilters(items, filters)
BEGIN
// Phase 1: Query preprocessing
normalizedQuery β NormalizeText(query)
queryTokens β Tokenize(normalizedQuery)
// Phase 2: Index lookup
candidates β SET()
FOR EACH token IN queryTokens DO
matches β SearchIndex.get(token)
candidates β candidates UNION matches
END FOR
// Phase 3: Scoring and ranking
scoredResults β []
FOR EACH item IN candidates DO
IF PassesPrefilter(item, filters) THEN
score β ScoreResult(item, queryTokens)
scoredResults.append({item: item, score: score})
END IF
END FOR
// Phase 4: Sort and filter
scoredResults.sortByDescending(score)
finalResults β ApplyFilters(scoredResults, filters)
FAQ
What is pseudocode?
It is a plain-language outline of program steps that a computer does not run.
Does it write the final code?
No. It prepares the logic that a coder can turn into real code later.
Where does it get the specification?
The skill looks for a completed specification in memory.
Details
Original description by the author
Agent skill for pseudocode - invoke with $agent-pseudocode
repo: ruvnet/ruflo
Popularity
- GitHub stars
- 81k
- Ranking position
- #1493
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-adaptive-coordinator
81kHelps your agent split and rebalance a group of AI agents as the workload changes, choosing a layout that fits the task.
agent-agent
81kTeaches your agent to turn a big goal into an ordered plan of actions, and to replan when conditions change.
agent-agentic-payments
81kHelps your agent manage spending mandates for AI shopping, with spend caps, time windows, merchant rules and signed approvals.
agent-analyze-code-quality
81kHelps your agent review code for quality, finding code smells, technical debt and refactoring ideas without changing the files.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.