agentation
2
总安装量
2
周安装量
#66174
全站排名
安装命令
npx skills add https://github.com/bamzc/claude-skills-frontend --skill agentation
Agent 安装分布
trae
2
claude-code
2
github-copilot
2
codex
2
kimi-cli
2
gemini-cli
2
Skill 文档
Agentation Setup
Set up the Agentation annotation toolbar in this project.
Requirements
- React 18+
- Zero dependencies beyond React
Steps
-
Check if already installed
- Look for
agentationin package.json dependencies - If not found, run
npm install agentation(or pnpm/yarn based on lockfile)
- Look for
-
Check if already configured
- Search for
<Agentationorimport { Agentation }in src/ or app/ - If found, report that Agentation is already set up and exit
- Search for
-
Detect project type
- Next.js App Router: has
app/layout.tsxorapp/layout.js - Next.js Pages Router: has
pages/_app.tsxorpages/_app.js - Vite + React: has
vite.config.ts/jsandsrc/main.tsx/jsx - Create React App: has
src/index.tsx/jsxorsrc/App.tsx/jsx - Other React projects: look for main entry file
- Next.js App Router: has
-
Add the component
For Next.js App Router, add to
app/layout.tsx:import { Agentation } from "agentation"; export default function RootLayout({ children }) { return ( <html> <body> {children} {process.env.NODE_ENV === "development" && <Agentation />} </body> </html> ); }For Next.js Pages Router, add to
pages/_app.tsx:import { Agentation } from "agentation"; export default function App({ Component, pageProps }) { return ( <> <Component {...pageProps} /> {process.env.NODE_ENV === "development" && <Agentation />} </> ); }For Vite + React, add to
src/main.tsx:import { Agentation } from "agentation"; ReactDOM.createRoot(document.getElementById('root')!).render( <React.StrictMode> <App /> {import.meta.env.DEV && <Agentation />} </React.StrictMode> );For Create React App, add to
src/index.tsx:import { Agentation } from "agentation"; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> {process.env.NODE_ENV === "development" && <Agentation />} </React.StrictMode> );For other React projects, add to the root component or main entry file:
import { Agentation } from "agentation"; // Add at the end of your root component {process.env.NODE_ENV === "development" && <Agentation />} -
Confirm setup
- Tell the user to run their dev server and look for the Agentation toolbar (floating button in bottom-right corner)
- The toolbar should appear in the bottom-right corner of the page
Notes
- The environment check ensures Agentation only loads in development
- For Vite projects, use
import.meta.env.DEVinstead ofprocess.env.NODE_ENV - For Next.js, use
process.env.NODE_ENV === "development" - No additional configuration needed â it works out of the box
- Compatible with any React 18+ project