Skip to content
CodeLifter
Search/ Browse prompts
CodeLifter Forum

Questions about code you did not write yourself.

71 threads, 100% answered. Search before you ask. The answer is usually here.

Sections
  1. ✓

    Why does an old script throw errors in a modern browser?

    An old script usually throws errors in a modern browser for one of five reasons: it runs before its elements exist, needs a library that is not loaded, calls...

    Script ShelfCodeLifter editorsStaff answer
    1reply
  2. ✓

    How do you add an SPDX licence header to a source file?

    Add one comment line at or near the top of the file reading SPDX-License-Identifier: followed by the licence's exact identifier from the SPDX License List, for...

    Code provenanceCodeLifter editorsStaff answer
    2replies
  3. ✓

    How do you write a contributing rule about AI-generated code?

    A contributing rule about AI-generated code is a short section in CONTRIBUTING.md, or a linked AIPOLICY.md, that answers five questions: is AI help allowed...

    AI code policiesCodeLifter editorsStaff answer
    2replies
  4. ✓

    How do you replace an old popup window script with a dialog?

    To replace an old window.open() popup, put the content in a element on the same page and open it with showModal() from a click on a real link or button. Close...

    Script ShelfCodeLifter editorsStaff answer
    1reply
  5. ✓

    How do you check whether AI-generated code copied open source code?

    No single tool proves AI-generated code is original, so check in layers. Turn on your assistant's public code matching if it has one, search distinctive lines...

    Code provenanceCodeLifter editorsStaff answer
    2replies
  6. ✓

    Why do old scripts use document.write, and what replaces it?

    Old scripts use document.write() because it was the simplest way to put content into a page while it loaded: one line, no element to find. It is now...

    Script ShelfCodeLifter editorsStaff answer
    1reply
  7. ✓

    How do you add an MCP server in Cursor?

    Add an MCP server to Cursor in one of two ways: install it from the Cursor Marketplace through the Customize page, or write it into an mcp.json file. Use...

    MCP and toolsCodeLifter editorsStaff answer
    2replies
  8. ✓

    How do you modernise an old cut-and-paste JavaScript script?

    To modernise an old cut-and-paste JavaScript script, move it into its own file loaded with defer, replace inline onclick and onload attributes with...

    Script ShelfCodeLifter editorsStaff answer
    1reply
  9. ✓

    Can you use AI-generated code in a commercial product?

    Yes, generally. The main assistants' terms allow commercial use of output: OpenAI and Anthropic assign their rights in output to you, and GitHub claims no...

    AI code policiesCodeLifter editorsStaff answer
    2replies
  10. ✓

    What is an SBOM, and does a vibe-coded app need one?

    An SBOM, or software bill of materials, is a machine-readable list of every component in a piece of software: each package, its version, supplier, licence and...

    Code provenanceCodeLifter editorsStaff answer
    2replies
  11. ✓

    How do you prompt an AI to refactor code without changing what it does?

    Pin the current behaviour with tests before any change, then ask for one small, named restructuring at a time, with explicit limits: same inputs and outputs...

    Vibe coding promptsCodeLifter editorsStaff answer
    2replies
  12. ✓

    Who owns code you write with an AI assistant at work?

    Usually your employer. In the US and the UK, code an employee writes as part of the job belongs to the employer unless a contract says otherwise, and an AI...

    AI code policiesCodeLifter editorsStaff answer
    2replies
  13. ✓

    How do Git commit timestamps work, and can they be changed?

    Every Git commit stores two timestamps: the author date, when the change was first written, and the committer date, when it was last applied. Both come from...

    Code provenanceCodeLifter editorsStaff answer
    2replies
  14. ✓

    How do you stop a coding agent from deleting files or running risky commands?

    To stop a coding agent from deleting files or running risky commands, layer four controls: approval prompts before shell commands, deny rules for destructive...

    MCP and toolsCodeLifter editorsStaff answer
    2replies
  15. ✓

    Does GitHub use your code to train Copilot?

    GitHub uses your Copilot interactions to train AI models if you are on Copilot Free, Pro, Pro+ or Max and have not opted out; that policy started on 24 April...

    AI code policiesCodeLifter editorsStaff answer
    2replies
  16. ✓

    What is prompt injection, and can it reach a coding agent?

    Prompt injection is text an AI system reads as data but follows as instructions, so its author can steer the system. It can reach a coding agent through...

    Code provenanceCodeLifter editorsStaff answer
    2replies
  17. ✓

    Can AI-generated code be copyrighted in the US?

    Not on its own. In the US, copyright protects only human authorship, so code whose expressive choices were made by an AI model is not protected, however good...

    AI code policiesCodeLifter editorsStaff answer
    2replies
  18. ✓

    How do you replace an old slideshow script with CSS scroll snap?

    Put the slides side by side in a horizontally scrolling container, add scroll-snap-type: x mandatory to the container and scroll-snap-align: start to each...

    Script ShelfCodeLifter editorsStaff answer
    2replies
  19. ✓

    How do you ask an AI to explain code you did not write?

    To get an AI to explain code you did not write, give it the file and the code around it, say what you need to understand and at what level, and ask for a...

    Vibe coding promptsCodeLifter editorsStaff answer
    2replies
  20. ✓

    How do you connect an MCP server to Claude Desktop?

    There are three ways to connect an MCP server to Claude Desktop. Install a packaged desktop extension from Settings, which needs no JSON. Add a local server to...

    MCP and toolsCodeLifter editorsStaff answer
    2replies
CodeLifter Forum. Questions and answers on vibe coding prompts, AI-generated code provenance, project AI policies and MCP tools.