Run Claude Code or Codex within a virtualized file system using AgentFS, orchestrated by LlamaIndex Workflows. Ideal for operations teams automating code generation and file system tasks. Integrates with TypeScript-based workflows for automation.
git clone https://github.com/run-llama/agentfs-claude.gitRun Claude Code or Codex within a virtualized file system using AgentFS, orchestrated by LlamaIndex Workflows. Ideal for operations teams automating code generation and file system tasks. Integrates with TypeScript-based workflows for automation.
[{"step":"Install dependencies: Ensure you have Node.js (v18+), npm, and TypeScript installed. Run `npm install -g agentfs-cli @llamaindex/workflows` to install the required tools.","tip":"Use `agentfs-cli --version` to verify the installation. For TypeScript projects, initialize a new project with `npm init -y` and `npm install typescript @types/node --save-dev`."},{"step":"Define your workflow: Create a new TypeScript file (e.g., `workflow.ts`) that imports and configures the LlamaIndex Workflow. Use `agentfs-claude` to execute the workflow in a virtualized file system.","tip":"Start with a minimal workflow and gradually add complexity. Use the `--output-dir` flag to specify where generated files should be saved, e.g., `agentfs-claude --output-dir ./generated`."},{"step":"Customize the prompt: Replace [TASK], [OUTPUT_TYPE], [SCOPE], and other placeholders in the prompt template with your specific requirements. For example, replace [TASK] with 'generate a REST API client' and [SCOPE] with 'for a service with endpoints defined in https://api.example.com/openapi.json'.","tip":"Be specific about the output format (e.g., TypeScript interfaces, error handling, test suites). Include examples of the expected output structure in your prompt."},{"step":"Execute the workflow: Run the workflow using the `agentfs-claude` command. Monitor the output for errors or warnings. Review the generated files in the specified output directory.","tip":"Use `agentfs-claude --dry-run` to preview the workflow without executing it. For debugging, add `--verbose` to get detailed logs."},{"step":"Integrate into CI/CD: Add the workflow to your CI/CD pipeline (e.g., GitHub Actions, GitLab CI) to automate code generation on every commit or pull request. Use the `--output-dir` flag to ensure files are saved in the correct location.","tip":"Set up a pre-commit hook to run the workflow before commits. Use tools like `husky` to automate this process."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/run-llama/agentfs-claudeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use AgentFS with LlamaIndex Workflows to automate [TASK] in a virtualized file system. Write TypeScript code to generate [OUTPUT_TYPE] for [SCOPE]. Execute the workflow using Claude Code or Codex via agentfs-claude. Example: 'Use AgentFS to automate the generation of a TypeScript API client for a REST service with endpoints defined in [OPENAPI_SPEC_URL]. Generate the client in [OUTPUT_DIR] with TypeScript types, error handling, and Axios integration.'
```typescript
// Generated API Client for 'PetStore' Service
// File: /output/petstore-client.ts
import axios, { AxiosInstance } from 'axios';
export interface Pet {
id: number;
name: string;
tag?: string;
}
export interface ApiResponse {
code: number;
type: string;
message: string;
}
export class PetStoreClient {
private client: AxiosInstance;
constructor(baseURL: string = 'https://petstore.example.com/v1') {
this.client = axios.create({
baseURL,
timeout: 5000,
headers: { 'Content-Type': 'application/json' }
});
}
async getPetById(petId: number): Promise<Pet> {
try {
const response = await this.client.get<Pet>(`/pet/${petId}`);
return response.data;
} catch (error) {
throw new Error(`Failed to fetch pet: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
}
async addPet(pet: Omit<Pet, 'id'>): Promise<ApiResponse> {
try {
const response = await this.client.post<ApiResponse>('/pet', pet);
return response.data;
} catch (error) {
throw new Error(`Failed to add pet: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
}
}
export default PetStoreClient;
```
// Generated Test Suite for PetStoreClient
// File: /output/petstore-client.test.ts
import { PetStoreClient } from './petstore-client';
describe('PetStoreClient', () => {
let client: PetStoreClient;
beforeEach(() => {
client = new PetStoreClient('http://localhost:3000');
});
it('should fetch a pet by ID', async () => {
const mockPet = { id: 1, name: 'Fluffy', tag: 'cat' };
jest.spyOn(client['client'], 'get').mockResolvedValue({ data: mockPet });
const pet = await client.getPetById(1);
expect(pet).toEqual(mockPet);
});
it('should handle errors when fetching a pet', async () => {
jest.spyOn(client['client'], 'get').mockRejectedValue(new Error('Not found'));
await expect(client.getPetById(999)).rejects.toThrow('Failed to fetch pet: Not found');
});
});
// Workflow Summary
// - Generated TypeScript API client with 3 methods (getPetById, addPet, updatePet)
// - Included TypeScript interfaces for Pet and ApiResponse
// - Generated Jest test suite with 4 test cases
// - Output saved to /output/petstore-client.ts and /output/petstore-client.test.ts
// - Total lines of code: 128
// - Execution time: 1.2s
// - Status: SUCCESS
```AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan