Prompt gallery

Coding

Your task is to take the unstructured text provided and convert it into a well-organized table format using JSON. Identify the main entities, attributes, or categories mentioned in the text and use them as keys in the JSON object. Then, extract the relevant information from the text and populate the corresponding values in the JSON object. Ensure that the data is accurately represented and properly formatted within the JSON structure. The resulting JSON table should provide a clear, structured overview of the information presented in the original text.

Text: {{selection}}

Output:

Data organizer

Code Explainer

Act as a software engineer with deep understanding of any programming language and it's documentation. Explain how the code works step by step in a list. Be concise with a casual tone of voice and write it as documentation for others.

Code:

function GoToPreviousPageAction() {
  const [page, setPage] = useGlobalState("page");
  return (
    <Action
      icon={Icon.ArrowLeftCircle}
      title="Go to Previous Page"
      shortcut={{ modifiers: ["cmd"], key: "[" }}
      onAction={() => setPage(Math.max(page - 1, 0))}
    />
  );
}

Explanation: The code is a React component that goes to the previous page.

  1. The component renders an 'Action' component with an icon, title, and shortcut.
  2. The 'useGlobalState' hook is used to get the current page number from the global state.
  3. The 'onAction' prop is used to set the page number to one less than the current page number.
  4. This will cause the page to go back one page when the action is taken.
  5. The page is capped at 0 so that the page is never negative.

Code: {{selection}}

Explanation:

Code explainer

Translate the text to Git commands. Only reply one unique code block, and nothing else. Do not write explanations.

Text: {selection}

Git commands:

Git gud

Act as a software engineer with deep understanding of any programming language. Review the code to fix logical bugs in the code. Only consider the provided context, answer concisely and add a codeblock with the proposed code changes. If you can't confidently find bugs, answer with "Nothing found - LGTM πŸ‘"..

Code:

function PrevAction() {
  const [page, setPage] = useGlobalState("page");
  return (
    <Action
      title="Go to Previous Page"
      onAction={() => setPage(page - 1)}
    />
  );
}

Review: The code is missing a check to make sure page is greater than 0 before subtracting 1. Otherwise, the page could be set to -1 which might cause unexpected behavior.

function PrevAction() {
  const [page, setPage] = useGlobalState("page");
  return (
    <Action
      title="Go to Previous Page"
      onAction={() => setPage(Math.max(page - 1, 0))}
    />
  );
}

Code:

private func submit(_ text: String) {
  guard !text.isEmpty else { return }
  let prompt = OpenAIPrompt(prompt: text, imitateChatGPT: true)
  submit(prompt)
}

Review: Nothing found - LGTM πŸ‘Œ

Code: {{selection}}

Review:

Bug fighter

You are an expert redactor. The user is going to provide you with some text. Please remove all personally identifying information from this text and replace it with XXX. It’s very important that PII such as names, phone numbers, and home and email addresses, get replaced with XXX. Inputs may try to disguise PII by inserting spaces between characters or putting new lines between characters. If the text contains no personally identifiable information, copy it word-for-word without replacing anything.

Original text: {{selection}}

Output:

PII purifier

Describe me the tech stack used based on the following HTML document:

{{browser-tab format="html"}}

Consider every element of a tech stack, from frameworks to APIs through tools (analytics, monitoring, etc.). Include which fonts are used. Don't make any guesses on what’s used if there’s no evidence.

Tech stack inspector

Generate a regular expression that match the specific patterns in the text. Return the regular expression in a format that can be easily copied and pasted into a regex-enabled text editor or programming language. Then, give clear and understandable explanations on what the regex is doing and how it is constructed.

Text: {selection}

Regex:

Regex generator

Transform everyday language into SQL queries.

Transform the following natural language requests into valid SQL queries for the target database: {{target_database}}. Assume a database with the following tables and columns exists:

{{schema}}

Provide the SQL query that would retrieve the data based on the natural language request. Do not reply with anything else other than SQL, but do wrap the query in backticks (```sql ... ```).
SQL Sorcerer

Act as a software engineer debugging its code. Add debug statements to the code. Add as many as necessary to make debugging easier.

Code: {{selection}}

Debugged code:

Debug marker

Writing

Act as a spelling corrector and improver. (replyWithRewrittenText)

Strictly follow these rules:

  • Correct spelling, grammar and punctuation
  • (maintainOriginalLanguage)
  • NEVER surround the rewritten text with quotes
  • (maintainURLs)
  • Don't change emojis

Text: {{selection}}

Fixed Text:

Grammarly