eclipse-edit
Skill171 starsChanged 3 months agoMITView on GitHub
Edit files in Eclipse projects using MCP tools. Use this when modifying code in Eclipse workspace projects — it keeps Eclipse editors in sync, triggers incremental compilation, and provides undo via local history.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- eclipse-analyzeSkill
- eclipse-debugSkill
- eclipse-runSkill
- eclipse-testSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
All tools require projectName (Eclipse project name) and filePath (relative to project root, without project name)
- Very specific: line 54
Use getProjectLayout with scopePath and maxDepth to navigate large projects
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Eclipse Code Editing
Edit files in Eclipse workspace projects using the eclipse-coder MCP tools. These tools keep Eclipse editors synchronized, trigger incremental compilation, and maintain local history for undo.
Available Editing Tools
- applyPatch — Atomically apply a unified diff after validating every hunk. It supports multiple hunks and fuzzy context matching, preserves the file's line delimiter, creates an
undoEditbackup, and can show Eclipse's Apply Patch wizard withshowDialog=true. - replaceString — Find and replace exact string. Good for single targeted changes. Optionally scoped to a line range.
- insertIntoFile — Insert content before a specific line (1-based).
- createFile — Create a new file and open it in the editor.
- deleteFile — Delete a file from the project.
- deleteLinesInFile — Delete a range of lines (1-based, inclusive).
- replaceFileContent — Replace entire file content.
- formatFile — Format a Java file using Eclipse's formatter (Ctrl+Shift+F).
- organizeImports — Organize imports in a Java file (Ctrl+Shift+O).
- organizeImportsInPackage — Organize imports across all files in a package.
- undoEdit — Restore a file from Eclipse's local history.
Direct file edits return only after Eclipse has synchronized the saved resource, workspace notifications, cached content, JDT compilation unit (for Java files), and editor selection. Check the Workspace state line in the result for saved, cache/JDT state, and the final modification stamp.
Refactoring Tools
For Java files, prefer refactoring tools over manual rename/move — they update all references:
- refactorRenameJavaType — Rename class/interface/enum with workspace-wide reference updates.
- refactorMoveJavaType — Move type to different package with reference updates.
- refactorRenamePackage — Rename package with all declaration and reference updates.
- moveResource — Move file/folder (no reference updates — use refactorMoveJavaType for Java).
Workflow
- Read efficiently — Don't dump entire files:
getClassOutline→ understand class structure (~30 lines vs ~300)getMethodSource→ read only the methods you need to editgetFilteredSource→ full source with non-relevant methods collapsedreadProjectResourcewithexcludeImports=true→ skip import noise- Reserve
getSource/ fullreadProjectResourcefor small files
- Edit using the appropriate tool (see above)
- Verify with
getCompilationErrorsto check for problems - Clean up with
organizeImportsif new types were referenced,formatFilefor conventions
Tips
- For multi-hunk changes, prefer
applyPatchover multiplereplaceStringcalls replaceStringrequires exact whitespace matching — if it fails, tryapplyPatchinstead- All tools require
projectName(Eclipse project name) andfilePath(relative to project root, without project name) - Editing tools open/refresh the affected file and reveal the edited line; multi-file refactorings reveal the primary or first changed file
- Use
getProjectLayoutwithscopePathandmaxDepthto navigate large projects - Line numbers from
getClassOutline,getMethodSource, andgetFilteredSourceare always accurate forreplaceStringline ranges andapplyPatchhunks
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

