Extract programming-language-agnostic pseudocode from source code in any language, preserving control flow and logical structure while filtering out implementation details. Use when the user asks to convert code to pseudocode, abstract code logic, understand code structure without syntax, create language-independent documentation, or analyze algorithmic flow without language-specific details.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill pseudocode-extractor
Transform source code from any programming language into clear, language-agnostic pseudocode that captures the essential logic and control flow while removing syntax-specific details.
First, identify the programming language and understand the code structure:
Focus on WHAT the code does, not HOW it's implemented:
Preserve:
Filter out:
Use clear, readable pseudocode conventions:
Structure:
FUNCTION function_name(parameters)
// High-level description of what function does
IF condition THEN
action
ELSE IF another_condition THEN
another_action
ELSE
default_action
END IF
FOR EACH item IN collection DO
process item
END FOR
WHILE condition DO
action
END WHILE
RETURN result
END FUNCTION
Conventions:
Structure the pseudocode to match the original code organization:
For single functions:
For classes:
For modules/files:
Input (Python):
def calculate_discount(price, customer_type):
if customer_type == "premium":
discount = 0.20
elif customer_type == "regular":
discount = 0.10
else:
discount = 0.05
final_price = price * (1 - discount)
return round(final_price, 2)
Output (Pseudocode):
FUNCTION calculate_discount(price, customer_type)
// Calculate final price after applying customer-specific discount
IF customer_type is "premium" THEN
discount ← 20%
ELSE IF customer_type is "regular" THEN
discount ← 10%
ELSE
discount ← 5%
END IF
final_price ← price × (1 - discount)
RETURN final_price rounded to 2 decimals
END FUNCTION
Input (JavaScript):
function filterActiveUsers(users) {
const activeUsers = [];
for (let i = 0; i < users.length; i++) {
if (users[i].lastLogin !== null &&
users[i].status === 'active') {
activeUsers.push({
id: users[i].id,
name: users[i].name
});
}
}
return activeUsers;
}
Output (Pseudocode):
FUNCTION filter_active_users(users)
// Extract active users who have logged in at least once
active_users ← empty list
FOR EACH user IN users DO
IF user has logged in AND user status is "active" THEN
ADD user.id and user.name to active_users
END IF
END FOR
RETURN active_users
END FUNCTION
Input (Java):
public class ShoppingCart {
private List<Item> items;
private double totalPrice;
public ShoppingCart() {
this.items = new ArrayList<>();
this.totalPrice = 0.0;
}
public void addItem(Item item) {
items.add(item);
totalPrice += item.getPrice();
}
public void removeItem(String itemId) {
for (int i = 0; i < items.size(); i++) {
if (items.get(i).getId().equals(itemId)) {
totalPrice -= items.get(i).getPrice();
items.remove(i);
break;
}
}
}
public double getTotalPrice() {
return totalPrice;
}
}
Output (Pseudocode):
CLASS ShoppingCart
ATTRIBUTES:
items: list of Item objects
total_price: numeric value
CONSTRUCTOR
Initialize empty items list
Set total_price to 0
END CONSTRUCTOR
METHOD add_item(item)
Add item to items list
Increase total_price by item price
END METHOD
METHOD remove_item(item_id)
FOR EACH item IN items DO
IF item.id equals item_id THEN
Decrease total_price by item price
Remove item from items list
EXIT loop
END IF
END FOR
END METHOD
METHOD get_total_price()
RETURN total_price
END METHOD
END CLASS
IF condition THEN
action
ELSE IF another_condition THEN
another_action
ELSE
default_action
END IF
FOR i FROM 1 TO n DO
action
END FOR
FOR EACH element IN collection DO
process element
END FOR
WHILE condition DO
action
END WHILE
REPEAT
action
UNTIL condition
// Assignment
variable ← value
// Comparison
IF x > y THEN ...
IF x ≠ y THEN ...
// Collections
ADD item TO list
REMOVE item FROM list
FIND item IN list WHERE condition
result ← function_name(arguments)
CALL procedure_name(arguments)
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take arabelatso/pseudocode-extractor from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.