To create your own Chrome extension similar to the Thinking Claude extension but focused on [Redacted Person] [Redacted Person], you can follow a structured approach based on the existing code and architecture of the Thinking Claude extension. Here's a step-by-step guide on how to do this:
1. Set Up Your Development Environment
Before starting, ensure you have the necessary tools installed:
Node.js (v18 or higher)
Bun (for package management and running scripts)
Git (for version control)
Google Chrome (for testing the extension)
Installing Node.js:
Download from nodejs.org and install the LTS version.
Verify installation:
bash
node --version
npm --version
Installing Bun:
For macOS or Linux:
bash
curl -fsSL https://bun.sh/install | bash
For Windows (using WSL):
Install WSL:
powershell
wsl --install
Run in WSL:
bash
curl -fsSL https://bun.sh/install | bash
2. Clone the Repository
Start by cloning the Thinking [Redacted Person] repository. This will give you a working base to modify for your needs.
bash
git clone https://github.com/richards199999/Thinking-Claude.git
cd Thinking-Claude/extensions/chrome
3. Modify the Code for Coding [Redacted Person]
a. Update the Project Structure
Change the names and references in the project to reflect "Coding [Redacted Person]" instead of "Thinking [Redacted Person]". Here are some areas to focus on:
Change the Project Name:
Modify package.json:
json
{
"name": "coding-claude",
"description": "Chrome extension for letting [Redacted Person] code like a real human"
}
Update the README:
Change the title and any references from "Thinking [Redacted Person]" to "Coding [Redacted Person]".
b. Implement Your Logic
You will want to modify the logic in the core files to accommodate the functionalities specific to coding. This might include:
Background Script (src/background/index.ts):
Adjust the message types and logic to handle coding-related actions.
Content Script (src/content/index.ts):
Adapt how the extension interacts with the coding context, such as code editors or IDEs.
User Interface:
Change the UI components in src/components to suit coding tasks. For example, you may want to provide coding templates or snippets instead of thought instructions.
c. Update Instructions:
Modify the instruction files to provide context and examples specific to coding. This can be done by creating a new directory for your coding instructions, similar to how the model_instructions are structured in the original repository.
4. Set Up Development Tools
Keep the development tools the same as in the original project:
TypeScript: for type safety.
React: for building the UI.
Tailwind CSS: for styling.
Vitest: for testing.
Ensure you have the necessary dependencies in package.json as per your new project requirements.
5. Build and Test Your Extension
After making your modifications:
Install Dependencies:
bash
bun install
Build the Extension:
bash
bun run build
Load the Extension in Chrome:
Open Chrome and navigate to chrome://extensions/.
Enable "Developer mode".
Click on "Load unpacked" and select the dist folder.
Test Your Extension:
Interact with it in the context of a coding environment (e.g., a code editor like CodeSandbox, or GitHub code editor) to ensure it behaves as expected.
6. Continuous Improvements
After testing, iterate on your extension by adding more features, improving the UI, and making adjustments based on user feedback.
Example Changes
Here are specific files you might want to modify:
src/background/index.ts: Adjust logic to handle coding messages.
src/content/index.ts: Update how it listens for route changes or coding context.
src/components/instruction-selector/index.tsx: Change the UI to display coding instructions or templates.
Final Thoughts
By leveraging the structure and functionality of the Thinking [Redacted Person] extension, you can efficiently create your own Coding Claude extension tailored to coding tasks. Make sure to continuously test and gather feedback to refine your extension further. Happy coding!