Skip to main content
fileio-swarm-advanced Advanced File I/O and shared state management for Claude Code multi-agent swarm operations with atomic operations, conflict resolution, and concurrent access control
설치로 이동 Skills Marketplace 커뮤니티가 만든 AI 스킬을 발견하고 탐색하세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/aegntic/cldcde --skill fileio-swarm-advanced명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Zip 다운로드 다운로드 중... name fileio-swarm-advanced description Advanced File I/O and shared state management for Claude Code multi-agent swarm operations with atomic operations, conflict resolution, and concurrent access control
Advanced File I/O for Multi-Agent Swarm Operations
A comprehensive skill for managing shared state and data persistence in Claude Code multi-agent swarm operations. This skill provides atomic file operations, conflict resolution, concurrent access control, and progress tracking capabilities essential for coordinating multiple agents working on shared resources.
Core Features
🔄 Shared State Management
Atomic read-write operations with file locking
State synchronization across multiple agents
Conflict detection and resolution strategies
Version control integration for state changes
📁 Multi-Format Support
JSON, YAML, TOML, CSV, Markdown file handling
Binary file operations with integrity checks
Configurable serialization/deserialization
Format validation and schema enforcement
🔒 Concurrent Access Control
File-based locking mechanisms
Deadlock detection and prevention
Graceful conflict resolution
Agent identity and priority management
📊 Progress Tracking & Logging
Real-time progress monitoring
Comprehensive operation logging
Performance metrics and analytics
Error tracking and recovery suggestions
🛡️ Data Integrity & Validation
Checksum verification for file integrity
Schema validation for structured data
Backup and recovery mechanisms
Data consistency checks
Quick Start
swarmFileManager = ({
: ,
: ,
: ,
:
});
swarmFileManager. ( , {
: ,
: [ , ],
:
});
updated = swarmFileManager. ( ,
({
...state,
: . (state. + , ),
: (). ()
})
);
tracker = swarmFileManager. ( , {
: ,
:
});
tracker. ( );
const
new
SwarmFileManager
workspace
'/workspace/swarm-data'
agentId
'agent-001'
lockTimeout
30000
maxRetries
3
await
createSharedState
'project-status'
phase
'development'
agents
'agent-001'
'agent-002'
progress
0.25
const
await
updateSharedState
'project-status'
(state ) =>
progress
Math
min
progress
0.1
1.0
lastUpdate
new
Date
toISOString
const
createProgressTracker
'data-processing'
totalItems
1000
agents
3
await
updateProgress
250
Installation & Setup
Copy this skill to your Claude Code skills directory
Install dependencies: npm install fs-extra lockfile crypto
Create workspace directory for swarm operations
Configure agent identities and permissions
Usage Examples
Shared State Management
await swarmFileManager.createSharedState ('task-queue' , {
tasks : [],
completed : 0 ,
failed : 0 ,
status : 'initializing'
});
await swarmFileManager.updateSharedState ('task-queue' , (state ) => ({
...state,
tasks : [
...state.tasks ,
{ id : 'task-001' , agent : 'agent-002' , priority : 'high' }
]
}));
const result = await swarmFileManager.updateSharedState ('task-queue' , (state ) => {
const task = state.tasks .find (t => t.id === 'task-001' );
if (task && task.status !== 'completed' ) {
return {
...state,
tasks : state.tasks .map (t =>
t.id === 'task-001'
? { ...t, status : 'completed' , completedAt : Date .now () }
: t
),
completed : state.completed + 1
};
}
return state;
});
Progress Tracking
const tracker = swarmFileManager.createProgressTracker ('batch-processing' , {
totalItems : 5000 ,
batchSize : 100 ,
agents : ['agent-001' , 'agent-002' , 'agent-003' ]
});
await tracker.reportProgress ({
agentId : 'agent-001' ,
completed : 1200 ,
errors : 2 ,
currentBatch : 13
});
const progress = await tracker.getProgress ();
Conflict Resolution
const conflictResolver = new ConflictResolver ({
strategy : 'merge-priority' ,
priorityOrder : ['agent-001' , 'agent-002' , 'agent-003' ]
});
const resolved = await conflictResolver.resolve ('shared-config.json' , {
agentAChanges : { timeout : 5000 },
agentBChanges : { retries : 3 , timeout : 10000 }
});
API Reference
SwarmFileManager Main class for managing file operations in swarm environments.
Constructor new SwarmFileManager (options : SwarmFileManagerOptions )
Methods
createSharedState(name: string, data: any, options?: StateOptions)Creates a new shared state file with initial data.
getSharedState(name: string): Promise<any>Retrieves current shared state data.
updateSharedState(name: string, updater: Function, options?: UpdateOptions)Atomically updates shared state using provided updater function.
deleteSharedState(name: string): Promise<boolean>Safely removes shared state file.
lockFile(filePath: string, options?: LockOptions): Promise<LockHandle>Acquires exclusive lock on file for operations.
createProgressTracker(name: string, config: ProgressConfig): ProgressTrackerCreates progress tracker for monitoring long-running operations.
ProgressTracker Handles progress tracking across multiple agents.
Methods
reportProgress(progress: ProgressReport): Promise<void>Reports progress from an agent.
getProgress(): Promise<ProgressSummary>Gets aggregated progress from all agents.
markComplete(agentId: string): Promise<void>Marks agent's work as complete.
reset(): Promise<void>Resets progress tracking.
ConflictResolver Manages conflict resolution for concurrent file modifications.
Methods
resolve(filePath: string, conflicts: ConflictData[]): Promise<ResolvedData>Resolves conflicts using configured strategy.
detectConflicts(filePath: string): Promise<ConflictInfo[]>Detects potential conflicts in shared files.
Configuration Options
SwarmFileManagerOptions interface SwarmFileManagerOptions {
workspace : string ;
agentId : string ;
lockTimeout ?: number ;
maxRetries ?: number ;
retryDelay ?: number ;
backupEnabled ?: boolean ;
logLevel ?: 'debug' | 'info' | 'warn' | 'error' ;
}
StateOptions interface StateOptions {
format ?: 'json' | 'yaml' | 'toml' ;
schema ?: object ;
encryption ?: boolean ;
ttl ?: number ;
metadata ?: object ;
}
ProgressConfig interface ProgressConfig {
totalItems : number ;
batchSize ?: number ;
agents : string [];
updateInterval ?: number ;
checkpoints ?: boolean ;
}
Advanced Features
Atomic Operations
ACID-compliant file operations
Transactional updates with rollback capability
Isolation levels for concurrent operations
Backup & Recovery
Automatic snapshot creation
Point-in-time recovery
Incremental backup support
Disaster recovery procedures
Performance Optimization
Batch operations for bulk updates
Compression for large files
Caching layer for frequently accessed data
Asynchronous I/O operations
Security & Access Control
File permission management
Agent authentication and authorization
Data encryption at rest
Audit logging for compliance
Best Practices
Always use atomic updates for shared state modifications
Implement proper error handling and retry mechanisms
Use appropriate lock timeouts to prevent deadlocks
Regularly clean up stale locks and temporary files
Monitor performance metrics and optimize bottlenecks
Validate data before writing to shared state
Use meaningful names for shared state files
Document state schemas for team collaboration
Troubleshooting
Common Issues Deadlocks : Occur when agents wait indefinitely for locks
Solution: Implement timeout mechanisms and deadlock detection
Race Conditions : Multiple agents modifying state simultaneously
Solution: Use atomic operations and proper locking
File Corruption : Data integrity issues during concurrent access
Solution: Enable checksums and automatic backups
Performance Bottlenecks : Slow file operations with many agents
Solution: Implement batching and caching strategies
Debugging Enable debug logging to trace file operations:
const fileManager = new SwarmFileManager ({
workspace : '/workspace' ,
agentId : 'debug-agent' ,
logLevel : 'debug'
});
Monitor system resources and lock status:
ls -la /workspace/.locks/
tail -f /workspace/.logs/file-operations.log
Integration Examples
With GitHub Workflow Automation
const githubIntegration = new GitHubFileIntegration (fileManager);
await githubIntegration.syncWithRepository ({
repo : 'organization/project' ,
branch : 'main' ,
paths : ['shared-state/' , 'progress/' ]
});
With AgentDB Memory Patterns
const hybridStorage = new HybridStorage ({
fileManager : fileManager,
agentdb : agentdbClient,
syncStrategy : 'file-primary'
});
With Swarm Orchestration
const swarmCoordinator = new SwarmCoordinator ({
fileManager : fileManager,
communicationLayer : messageQueue,
consensusProtocol : 'raft'
});
Contributing This skill is designed to be extensible. To add new features:
Create feature branches from main
Add comprehensive tests for new functionality
Update documentation with examples
Ensure backward compatibility
Submit pull requests with detailed descriptions
License This skill is part of the Claude Code ecosystem and follows the project's licensing terms.
Generated with Claude Code Advanced Template System
이 저장소의 다른 Skills Run a 5-adviser council to stress-test any decision. Five distinct lenses (Contrarian, First-Principles, Expansionist, Outsider, Executor) answer independently, then anonymously peer-review each other, and a Chairman synthesizes a single clear recommendation. Kills sycophancy and groupthink on high-stakes calls.
Diligence-grade product and technical analysis for the ae.ltd proof-agent concept, including comparison against Cursor and Omnara, MVP and production architecture, red-team review, and build-vs-buy evaluation. Use when Codex needs to create or critique PRDs, tech specs, competitive diligence, leadership memos, or multi-agent evaluation packs for agent-runtime, demo-agent, or proof-agent products.
ae-ltd-claude-template-switchboard Use when creating or upgrading CLAUDE.md instructions and selecting the right template baseline for repo size, architecture, and team constraints. AE.LTD template decision workflow.