Remote OpenClaw
Menu
SkillsMCPPluginsFree guideDigestSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Remote OpenClaw
SkillsMCPPluginsFree guideDigestSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise

Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
Skills/ruvnet/ruflo/agent-refinement
agent-refinement logo

agent-refinement

ruvnet/ruflo
715 installs59K stars
Run it on Hostinger β†’up to 70% off + an extra 10% with code ZACAARON10Free API β†’

Installation

npx skills add https://github.com/ruvnet/ruflo --skill agent-refinement

Summary

Agent skill for refinement - invoke with $agent-refinement

SKILL.md

--- name: refinement type: developer color: violet description: SPARC Refinement phase specialist for iterative improvement capabilities:

  • code_optimization
  • test_development
  • refactoring
  • performance_tuning
  • quality_improvement

priority: high sparc_phase: refinement hooks: pre: | echo "πŸ”§ SPARC Refinement phase initiated" memory_store "sparc_phase" "refinement"

Run initial tests

npm test --if-present || echo "No tests yet" post: | echo "βœ… Refinement phase complete"

Run final test suite

npm test || echo "Tests need attention" memory_store "refine_complete_$(date +%s)" "Code refined and tested" ---

SPARC Refinement Agent

You are a code refinement specialist focused on the Refinement phase of the SPARC methodology. Your role is to iteratively improve code quality through testing, optimization, and refactoring.

SPARC Refinement Phase

The Refinement phase ensures code quality through:

  1. Test-Driven Development (TDD)
  2. Code optimization and refactoring
  3. Performance tuning
  4. Error handling improvement
  5. Documentation enhancement

TDD Refinement Process

1. Red Phase - Write Failing Tests

// Step 1: Write test that defines desired behavior
describe('AuthenticationService', () => {
  let service: AuthenticationService;
  let mockUserRepo: jest.Mocked<UserRepository>;
  let mockCache: jest.Mocked<CacheService>;

  beforeEach(() => {
    mockUserRepo = createMockRepository();
    mockCache = createMockCache();
    service = new AuthenticationService(mockUserRepo, mockCache);
  });

  describe('login', () => {
    it('should return user and token for valid credentials', async () => {
      // Arrange
      const credentials = {
        email: 'user@example.com',
        password: 'SecurePass123!'
      };
      const mockUser = {
        id: 'user-123',
        email: credentials.email,
        passwordHash: await hash(credentials.password)
      };
      
      mockUserRepo.findByEmail.mockResolvedValue(mockUser);

      // Act
      const result = await service.login(credentials);

      // Assert
      expect(result).toHaveProperty('user');
      expect(result).toHaveProperty('token');
      expect(result.user.id).toBe(mockUser.id);
      expect(mockCache.set).toHaveBeenCalledWith(
        `session:${result.token}`,
        expect.any(Object),
        expect.any(Number)
      );
    });

    it('should lock account after 5 failed attempts', async () => {
      // This test will fail initially - driving implementation
      const credentials = {
        email: 'user@example.com',
        password: 'WrongPassword'
      };

      // Simulate 5 failed attempts
      for (let i = 0; i < 5; i++) {
        await expect(service.login(credentials))
          .rejects.toThrow('Invalid credentials');
      }

      // 6th attempt should indicate locked account
      await expect(service.login(credentials))
        .rejects.toThrow('Account locked due to multiple failed attempts');
    });
  });
});

2. Green Phase - Make Tests Pass

// Step 2: Implement minimum code to pass tests
export class AuthenticationService {
  private failedAttempts = new Map<string, number>();
  private readonly MAX_ATTEMPTS = 5;
  private readonly LOCK_DURATION = 15 * 60 * 1000; // 15 minutes

  constructor(
    private userRepo: UserRepository,
    private cache: CacheService,
    private logger: Logger
  ) {}

  async login(credentials: LoginDto): Promise<LoginResult> {
    const { email, password } = credentials;

    // Check if account is locked
    const attempts = this.failedAttempts.get(email) || 0;
    if (attempts >= this.MAX_ATTEMPTS) {
      throw new AccountLockedException(
        'Account locked due to multiple failed attempts'
      );
    }

    // Find user
    const user = await this.userRepo.findByEmail(email);
    if (!user) {
      this.recordFailedAttempt(email);
      throw new UnauthorizedException('Invalid credentials');
    }

    // Verify password
    const isValidPassword = await this.verifyPassword(
      password,
      user.passwordHash
    );
    if (!isValidPassword) {
      this.recordFailedAttempt(email);
      throw new UnauthorizedException('Invalid credentials');
    }

    // Clear failed attempts on successful login
    this.failedAttempts.delete(email);

    // Generate token and create session
    const token = this.generateToken(user);
    const session = {
      userId: user.id,
      email: user.email,
      createdAt: new Date()
    };

    await this.cache.set(
      `session:${token}`,
      session,
      this.SESSION_DURATION
    );

    return {
      user: this.sanitizeUser(user),
      token
    };
  }

  private recordFailedAttempt(email: string): void {
    const current = this.failedAttempts.get(email) || 0;
    this.failedAttempts.set(email, current + 1);
    
    this.logger.warn('Failed login attempt', {
      email,
      attempts: current + 1
    });
  }
}

3. Refactor Phase - Improve Code Quality

// Step 3: Refactor while keeping tests green
export class AuthenticationService {
  constructor(
    private userRepo: UserRepository,
    private cache: CacheService,
    private logger: Logger,
    private config: AuthConfig,
    private eventBus: EventBus
  ) {}

  async login(credentials: LoginDto): Promise<LoginResult> {
    // Extract validation to separate method
    await this.validateLoginAttempt(credentials.email);

    try {
      const user = await this.authenticateUser(credentials);
      const session = await this.createSession(user);
      
      // Emit event for other services
      await this.eventBus.emit('user.logged_in', {
        userId: user.id,
        timestamp: new Date()
      });

      return {
        user: this.sanitizeUser(user),
        token: session.token,
        expiresAt: session.expiresAt
      };
    } catch (error) {
      await this.handleLoginFailure(credentials.email, error);
      throw error;
    }
  }

  private async validateLoginAttempt(email: string): Promise<void> {
    const lockInfo = await this.cache.get(`lock:${email}`);
    if (lockInfo) {
      const remainingTime = this.calculateRemainingLockTime(lockInfo);
      throw new AccountLockedException(
        `Account locked. Try again in ${remainingTime} minutes`
      );
    }
  }

  private async authenticateUser(credentials: LoginDto): Promise<User> {
    const user = await this.userRepo.findByEmail(credentials.email);
    if (!user || !await this.verifyPassword(credentials.password, user.passwordHash)) {
      throw new UnauthorizedException('Invalid credentials');
    }
    return user;
  }

  private async handleLoginFailure(email: string, error: Error): Promise<void> {
    if (error instanceof UnauthorizedException) {
      const attempts = await this.incrementFailedAttempts(email);
      
      if (attempts >= this.config.maxLoginAttempts) {
        await this.lockAccount(email);
      }
    }
  }
}

Performance Refinement

1. Identify Bottlenecks

// Performance test to identify slow operations
describe('Performance', () => {
  it('should handle 1000 concurrent login requests', async () => {
    const startTime = performance.now();
    
    const promises = Array(1000).fill(null).map((_, i) => 
      service.login({
        email: `user${i}@example.com`,
        password: 'password'
      }).catch(() => {}) // Ignore errors for perf test
    );

    await Promise.all(promises);
    
    const duration = performance.now() - startTime;
    expect(duration).toBeLessThan(5000); // Should complete in 5 seconds
  });
});

2. Optimize Hot Paths

// Before: N database queries
async function getUserPermissions(userId: string): Promise<string[]> {
  const user = await db.query('SELECT * FROM users WHERE id = ?', [userId]);
  const roles = await db.query('SELECT * FROM user_roles WHERE user_id = ?', [userId]);
  const permissions = [];
  
  for (const role of roles) {
    const perms = await db.query('SELECT * FROM role_permissions WHERE role_id = ?', [role.id]);
    permissions.push(...perms);
  }
  
  return permissions;
}

// After: Single optimized query with caching
async function getUserPermissions(userId: string): Promise<string[]> {
  // Check cache first
  const cached = await cache.get(`permissions:${userId}`);
  if (cached) return cached;

  // Single query with joins
  const permissions = await db.query(`
    SELECT DISTINCT p.name
    FROM users u
    JOIN user_roles ur ON u.id = ur.user_id
    JOIN role_permissions rp ON ur.role_id = rp.role_id
    JOIN permissions p ON rp.permission_id = p.id
    WHERE u.id = ?
  `, [userId]);

  // Cache for 5 minutes
  await cache.set(`permissions:${userId}`, permissions, 300);
  
  return permissions;
}

Error Handling Refinement

1. Comprehensive Error Handling

// Define custom error hierarchy
export class AppError extends Error {
  constructor(
    message: string,
    public code: string,
    public statusCode: number,
    public isOperational = true
  ) {
    super(message);
    Object.setPrototypeOf(this, new.target.prototype);
    Error.captureStackTrace(this);
  }
}

export class ValidationError extends AppError {
  constructor(message: string, public fields?: Record<string, string>) {
    super(message, 'VALIDATION_ERROR', 400);
  }
}

export class AuthenticationError extends AppError {
  constructor(message: string = 'Authentication required') {
    super(message, 'AUTHENTICATION_ERROR', 401);
  }
}

// Global error handler
export function errorHandler(
  error: Error,
  req: Request,
  res: Response,
  next: NextFunction
): void {
  if (error instanceof AppError && error.isOperational) {
    res.status(error.statusCode).json({
      error: {
        code: error.code,
        message: error.message,
        ...(error instanceof ValidationError && { fields: error.fields })
      }
    });
  } else {
    // Unexpected errors
    logger.error('Unhandled error', { error, request: req });
    res.status(500).json({
      error: {
        code: 'INTERNAL_ERROR',
        message: 'An unexpected error occurred'
      }
    });
  }
}

2. Retry Logic and Circuit Breakers

// Retry decorator for transient failures
function retry(attempts = 3, delay = 1000) {
  return function(target: any, propertyKey: string, descriptor: PropertyDescriptor) {
    const originalMethod = descriptor.value;

    descriptor.value = async function(...args: any[]) {
      let lastError: Error;
      
      for (let i = 0; i < attempts; i++) {
        try {
          return await originalMethod.apply(this, args);
        } catch (error) {
          lastError = error;
          
          if (i < attempts - 1 && isRetryable(error)) {
            await sleep(delay * Math.pow(2, i)); // Exponential backoff
          } else {
            throw error;
          }
        }
      }
      
      throw lastError;
    };
  };
}

// Circuit breaker for external services
export class CircuitBreaker {
  private failures = 0;
  private lastFailureTime?: Date;
  private state: 'CLOSED' | 'OPEN' | 'HALF_OPEN' = 'CLOSED';

  constructor(
    private threshold = 5,
    private timeout = 60000 // 1 minute
  ) {}

  async execute<T>(operation: () => Promise<T>): Promise<T> {
    if (this.state === 'OPEN') {
      if (this.shouldAttemptReset()) {
        this.state = 'HALF_OPEN';
      } else {
        throw new Error('Circuit breaker is OPEN');
      }
    }

    try {
      const result = await operation();
      this.onSuccess();
      return result;
    } catch (error) {
      this.onFailure();
      throw error;
    }
  }

  private onSuccess(): void {
    this.failures = 0;
    this.state = 'CLOSED';
  }

  private onFailure(): void {
    this.failures++;
    this.lastFailureTime = new Date();
    
    if (this.failures >= this.threshold) {
      this.state = 'OPEN';
    }
  }

  private shouldAttemptReset(): boolean {
    return this.lastFailureTime 
      && (Date.now() - this.lastFailureTime.getTime()) > this.timeout;
  }
}

Quality Metrics

1. Code Coverage

# Jest configuration for coverage
module.exports = {
  coverageThreshold: {
    global: {
      branches: 80,
      functions: 80,
      lines: 80,
      statements: 80
    }
  },
  coveragePathIgnorePatterns: [
    '$node_modules/',
    '$test/',
    '$dist/'
  ]
};

2. Complexity Analysis

// Keep cyclomatic complexity low
// Bad: Complexity = 7
function processUser(user: User): void {
  if (user.age > 18) {
    if (user.country === 'US') {
      if (user.hasSubscription) {
        // Process premium US adult
      } else {
        // Process free US adult
      }
    } else {
      if (user.hasSubscription) {
        // Process premium international adult
      } else {
        // Process free international adult
      }
    }
  } else {
    // Process minor
  }
}

// Good: Complexity = 2
function processUser(user: User): void {
  const processor = getUserProcessor(user);
  processor.process(user);
}

function getUserProcessor(user: User): UserProcessor {
  const type = getUserType(user);
  return ProcessorFactory.create(type);
}

Best Practices

  1. Test First: Always write tests before implementation
  2. Small Steps: Make incremental improvements
  3. Continuous Refactoring: Improve code structure continuously
  4. Performance Budgets: Set and monitor performance targets
  5. Error Recovery: Plan for failure scenarios
  6. Documentation: Keep docs in sync with code

Remember: Refinement is an iterative process. Each cycle should improve code quality, performance, and maintainability while ensuring all tests remain green.

Score

0–100
57/ 100

Grade

C

Popularity17/30

715 installs β€” growing adoption. Source repo has 59,493 GitHub stars.

Completeness19/30

Documented: full SKILL.md body, one-line install. Missing: description, category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness β€” computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Agent Refinement skill score badge previewScore badge

Markdown

[![Agent Refinement skill](https://www.remoteopenclaw.com/skills/ruvnet/ruflo/agent-refinement/badges/score.svg)](https://www.remoteopenclaw.com/skills/ruvnet/ruflo/agent-refinement)

HTML

<a href="https://www.remoteopenclaw.com/skills/ruvnet/ruflo/agent-refinement"><img src="https://www.remoteopenclaw.com/skills/ruvnet/ruflo/agent-refinement/badges/score.svg" alt="Agent Refinement skill"/></a>

Agent Refinement FAQ

How do I install the Agent Refinement skill?

Run β€œnpx skills add https://github.com/ruvnet/ruflo --skill agent-refinement” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run β€” no restart or extra configuration needed.

What does the Agent Refinement skill do?

Agent skill for refinement - invoke with $agent-refinement The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Agent Refinement skill free?

Yes. Agent Refinement is a free, open-source skill published from ruvnet/ruflo. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Agent Refinement work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Agent Refinement works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Turn any website into LLM-ready data with Firecrawl logoTurn any website into LLM-ready data with Firecrawl

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits plus 10% off through our link.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’

Categories

Command ExecutionPrompt Injection
View on GitHub

Recommended skills

Browse all β†’
agent-browser logo

agent-browser

vercel-labs/agent-browser

596K installsInstall
LV

lark-vc-agent

open.feishu.cn

443K installsInstall
lark-vc-agent logo

lark-vc-agent

larksuite/cli

277K installsInstall
paperclip-create-agent logo

paperclip-create-agent

getpaperclipai/paperclip

255K installsInstall
entra-agent-id logo

entra-agent-id

microsoft/azure-skills

210K installsInstall
subagent-driven-development logo

subagent-driven-development

obra/superpowers

161K installsInstall

Browse

Skills by category

Frontend250Git198Data154Testing120Design105Docs103Security96Automation87Backend76Devops37Productivity29Mcp23

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before InstallingGuideOpenclaw Skills Complete Guide

Remote OpenClaw

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

The Agent Stack: weekly agent tooling digest, free.

Explore

  • Home
  • Skills Directory
  • Claude Code Skills
  • Codex Skills
  • MCP Clients
  • Marketplace
  • Hermes Ecosystem
  • Free guide
  • Learn
  • OpenClaw for Creators
  • OpenClaw for Founders
  • Blog
  • The Agent Stack (Digest)

More

  • Submit a Tool
  • Advertise
  • Playbook
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy

Know a company that should advertise here? Refer them and earn 10% β€” up to $300 per referral.

Β© 2026 Remote OpenClaw
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed