Skip to content
moamen-uiPublic

About

Lightweight collaborative HTML commenting skill with Claude Code integration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

122 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pointer Logo

πŸ• Pointer

Quick, targeted feedback directly on HTML elements. No lengthy descriptionsβ€”just click, comment, and sync with AI.

Pointer β€” Your team's fastest way to give element-level feedback on live HTML pages.

For Designers, Front-end Developers, Business Analysts, Team Leads, Product Managers, and anyone on your team β€” Give precise feedback on any element, discuss in context, and let AI apply the changes.



Features

✨ Bookmarklet-based β€” Works on any localhost HTML page or static HTML file

  • Localhost: http://localhost:3000, http://localhost:8000, etc.
  • Static HTML: file:///path/to/your/page.html

πŸ’Ύ File-based storage β€” Comments saved as plain JSON (no database needed)
🎯 Element selection β€” Click any element to attach feedback
πŸ”„ AI-ready β€” Export pending comments for any AI agent to apply changes
(Claude Code, ChatGPT, Gemini, Copilot, or your favorite AI)
πŸ“ Threaded replies β€” Discuss changes in context before applying
🎨 Visual highlighting β€” See which elements have comments
πŸ“ Pin positions β€” Comments follow elements during scroll/zoom



Why Pointer?

❌ The old way (lengthy and error-prone):

Go to the contact page, find the header section, and change the title size to 24px

βœ… The Pointer way (precise and instant):

Make this 24px
  1. πŸ• Click the element
  2. πŸ’¬ Say "Make this 24px"
  3. ✨ Done β€” AI gets it instantly


Perfect for:

πŸ‘¨β€πŸ’Ό Product Managers
Validate requirements before design, generate specs directly from live pages, gather feedback faster

🎨 Designers
Convert requirements and user stories to interactive designs using AI, get precise feedback from stakeholders, streamline design reviews with visual comments

πŸ“‹ Business Analysts
Prepare detailed user stories based on design mockups, validate business requirements against implementation

πŸ§ͺ QA/Testers
Highlight bugs and issues instantly without screenshot tools, give feedback faster with visual context, create test cases from comments

πŸ’» Front-end Developers
Fix issues directly with AI assistance, iterate on live pages in real-time, pair with AI for live coding sessions

⚑ Team Leads
Facilitate faster design reviews and feedback loops, reduce communication overhead across team



Quick Start


Step 1: Clone the Repository

git clone https://github.com/osama-eldrieny/Pointer.git

Step 2: Start the Comments Server (Terminal 1)

Navigate to the skill folder and start the server:

cd Pointer/comments-skill
npm install
npm start

You'll see:

🎯 HTML Comments server running at http://localhost:3001
πŸ“Œ Bookmarklet page: http://localhost:3001/bookmarklet
⚠️ IMPORTANT: Keep this terminal open β€” the comments server must stay running for the bookmarklet to work.

Step 3: Enable Comments with Bookmarklet (Quick Testing)

  1. Open http://localhost:3001/bookmarklet in your browser
  2. Drag the "Pointer" logo to your bookmarks bar (click and hold, then drag)
  3. The pointer bookmark should now appear in your browser's bookmarks as "πŸ• Pointer"
  4. On any page, click the bookmarklet to activate the comments UI

Step 4: One-Time Setup - Pointer for Easy Access

Benefits of this one-time setup:

  • βœ… Comments UI loads automatically on every page load
  • βœ… No need to click the bookmarklet each time
  • βœ… Comments persist across page refreshes
  • βœ… Perfect for development workflows

To make Pointer always open and survive page refreshes, add one of these script tags to your HTML <head> or before </body>:

Option 1: Add this code in <head> tag

<!-- HTML Comments Skill: Enables the comments UI on page load.
     Ensure the comments server is running on port 3001. -->
<script src="http://localhost:3001/inject.js" defer></script>

Option 2: Or add this code

<script>
  (function() {
    var s = document.createElement('script');
    s.src = 'http://localhost:3001/inject.js?t=' + Date.now();
    s.defer = true;
    document.head.appendChild(s);
  })();
</script>

Step 5: Open Your Project in the Browser

Open your Project HTML file in the browser β€” either as a local server or directly:

  • Test file: Open the included test.html file directly in your browser (file is at the project root)
  • Your project: Open your own HTML file or project URL
  • Local server: Open http://localhost:8000, http://localhost:3000, etc. (use whatever port your project runs on)
  • Static file: Open file:///path/to/your/project.html (open HTML file directly without a server)

Step 6: Start Commenting

  1. Click the "πŸ• Pointer" bookmarklet from your bookmarks bar if it's not opened
  2. A toolbar appears in the top-right corner
  3. Click "+ Add Comment" button
  4. Click any element on the page to attach a comment
  5. Type your feedback and submit
  6. See numbered pins appear on the element

Step 7: View & Manage Comments

  1. Click "All Comments" button in the toolbar
  2. The sidebar opens showing all comments on the page
  3. You can:
    • Reply to comments to discuss changes
    • Delete comments you no longer need
    • Read full comment history with replies

Step 8: Queue Changes for your AI Agent

When ready to apply a comment:

  1. Click "Ready to Apply" button on the comment
  2. The status changes to "Pending Apply" (highlighted in yellow)
  3. If the comment has replies, you can mark individual replies instead
  4. The comment is now in the queue for your AI to process

Step 9: Apply Changes with your AI Agent

First Time Setup (One-Time Only)

Before applying comments, ask your AI agent to understand how Pointer works:

Check Pointer folder and understand how pointer tool works, don't create overview.md

This helps the AI agent understand the Pointer workflow, comments structure, and how to apply changes correctly.


Apply Pending Comments

After the AI understands Pointer, use this single command with any AI agent:

apply pending comments

Supported AI Agents:

  • Claude Code
  • ChatGPT
  • Gemini
  • Copilot
  • And any other AI agent

Your AI agent will:

  • Read all queued comments from pending-apply.json
  • Apply each change to the corresponding HTML file
  • Add an AI reply showing what was changed
  • Mark the comment as βœ“ Applied

Refresh your browser to see the changes.

πŸ’‘ Pro tip: If you want the browser to refresh automatically after applying comments, ask your AI agent to add a browser refresh step to the flow.

That's it! Your HTML is now updated with all the changes. πŸŽ‰



API Quick Reference

Method Endpoint Purpose
GET /api/comments?page_url=... Fetch comments for a page
POST /api/comments Create a comment
POST /api/comments/:id/reply Add reply to comment
PATCH /api/comments/:id Update status (for AI apply workflow)
DELETE /api/comments/:id Delete comment


Apply with Claude Code

Mark comments as "pending-apply" in the UI, then tell Claude Code:

Apply pending comments from pending-apply.json. Read the file,
apply each requested change to its HTML file, add AI replies to comments.json,
and clear pending-apply.json when done.

Claude will:

  • Read pending-apply.json (auto-generated work queue)
  • Edit HTML files on disk
  • Update comments.json with AI replies
  • Mark comments as βœ“ applied

See CLAUDE_CODE_INTEGRATION.md for details.



File Structure

Pointer/
β”œβ”€β”€ comments-skill/
β”‚   β”œβ”€β”€ server.js                    # Express API server
β”‚   β”œβ”€β”€ inject.js                    # Browser overlay & UI (~22KB)
β”‚   β”œβ”€β”€ comments.json                # All comments (auto-created)
β”‚   β”œβ”€β”€ pending-apply.json           # Work queue for AI apply
β”‚   β”œβ”€β”€ config.json                  # Configuration
β”‚   β”œβ”€β”€ package.json                 # Dependencies
β”‚   β”œβ”€β”€ package-lock.json            # Locked dependencies
β”‚   β”œβ”€β”€ README.md                    # Full documentation
β”‚   β”œβ”€β”€ QUICK_REFERENCE.md           # Quick lookup
β”‚   β”œβ”€β”€ SKILL_SETUP.md               # Setup guide
β”‚   └── CLAUDE_CODE_INTEGRATION.md   # AI apply workflow
β”‚
β”œβ”€β”€ assets/
β”‚   └── images/
β”‚       β”œβ”€β”€ pointer-icon.png         # Main icon (draggable bookmark)
β”‚       β”œβ”€β”€ pointer-icon-16.png      # Small icon variant
β”‚       β”œβ”€β”€ pointer-icon-favicon.png # Favicon for bookmarklet page
β”‚       └── favicon.ico              # Standard favicon
β”‚
β”œβ”€β”€ test.html                        # Example/demo page
β”œβ”€β”€ README.md                        # Main documentation
└── package-lock.json                # Root dependencies lock


Configuration

Edit comments-skill/config.json:

{
  "project_root": "../",            // Path to HTML files
  "server_port": 3001,              // Server port
  "url_base": "http://localhost:8000", // Your local server URL
  "comments_file": "./comments.json" // Where comments are stored
}


Storage

  • comments.json β€” All comments with full history (append-only)
  • pending-apply.json β€” Work queue (auto-managed, cleared after applying)

Both are plain JSON β€” edit directly if needed.



Example Comment in comments.json

{
  "id": "c_1718450000_abc123",
  "page_url": "file:///Users/you/project/test.html",
  "html_file_path": "../test.html",
  "element_selector": "body > main > h1.title",
  "element_snapshot": "<h1 class=\"title\">Dashboard</h1>",
  "element_tag": "h1",
  "element_classes": ["title"],
  "element_id": null,
  "computed_styles": {
    "font-size": "36px",
    "font-weight": "700"
  },
  "applied_css_rules": [],
  "parent_element_info": {
    "tag": "main",
    "classes": [],
    "id": null
  },
  "pin_x": 50.5,
  "pin_y": 75.0,
  "author": "Alice",
  "text": "Change font to Inter",
  "status": "applied",
  "scope": "element",
  "apply_to": "element-only",
  "created_at": "2026-06-16T10:00:00Z",
  "replies": [
    {
      "id": "r_1718450100_xyz",
      "author": "Bob",
      "text": "Suggested: use font-weight 600",
      "created_at": "2026-06-16T10:05:00Z",
      "status": "open"
    },
    {
      "id": "r_1718450150_uvw",
      "author": "Charlie",
      "text": "I think 700 is better",
      "created_at": "2026-06-16T10:10:00Z",
      "status": "pending-apply"
    },
    {
      "id": "r_1718450200_ai",
      "author": "AI",
      "is_ai": true,
      "text": "βœ“ Applied β€” Changed font-family to 'Inter', font-weight to 700",
      "created_at": "2026-06-16T10:15:00Z",
      "status": "applied"
    }
  ]
}


Example Pending Apply in pending-apply.json

{
  "id": "c_1718450000_abc123",
  "apply_comment": true,
  "apply_reply_ids": ["r_1718450150_uvw"],
  "original_comment": {
    "text": "Change font to Inter",
    "status": "applied"
  },
  "replies": [
    {
      "id": "r_1718450100_xyz",
      "author": "Bob",
      "text": "Suggested: use font-weight 600",
      "created_at": "2026-06-16T10:05:00Z",
      "status": "open"
    },
    {
      "id": "r_1718450150_uvw",
      "author": "Charlie",
      "text": "I think 700 is better",
      "created_at": "2026-06-16T10:10:00Z",
      "status": "pending-apply"
    }
  ],
  "element_selector": "body > main > h1.title",
  "page_url": "file:///Users/you/project/test.html",
  "author": "Alice",
  "created_at": "2026-06-16T10:00:00Z",
  "pin_x": 50.5,
  "pin_y": 75.0
}


Workflow

  1. Add β€” Click element, type feedback, submit
  2. Discuss β€” Reply in context with team
  3. Mark β€” Click "Mark Apply" when ready for AI
  4. Apply β€” Tell Claude Code "apply pending comments"
  5. Done β€” AI replies appear, changes live, status β†’ βœ“


Why This Approach?

  • No database β€” Plain JSON files, easy to version control
  • No auth β€” Local team skill, no user management needed
  • No external API β€” Claude Code applies changes locally
  • Portable β€” Ship with your project, works anywhere
  • Transparent β€” See exactly what's being applied


Limitations

  • Local/localhost only (not internet-facing)
  • Single-process concurrency (file-based writes)
  • No real-time sync across multiple users
  • Node.js 14+ required


Troubleshooting

Server won't start?

# Kill process on port 3001
kill -9 $(lsof -t -i :3001)

# Start fresh
npm start

Bookmarklet not loading?

  • Check browser console (F12)
  • Verify config.json url_base matches your server
  • Ensure CORS is enabled (it is by default)

Comments not showing?

  • Refresh page
  • Check comments-skill/comments.json exists
  • Verify paths in config are correct


Creator

Osama Eldrieny



License

MIT



See Also

About

Lightweight collaborative HTML commenting skill with Claude Code integration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages