Boost Your Learning with ChatGPT and Apple's Shortcuts App
Tags: learning, chatgpt
Published: 2024-06-29 18:39:41

---
title: Boost Your Learning with ChatGPT and Apple's Shortcuts App
published: true
date: 2024-06-29 08:00:51 UTC
tags: learning,chatgpt
canonical_url: https://blog.lamparelli.eu/boost-your-learning-with-chatgpt-and-apples-shortcuts-app
---

Hello There! 👋

After attending an insightful AI talk by [Benoit Macq](https://www.linkedin.com/in/benoitmacq/) and [Bruno Colmant](https://www.linkedin.com/in/brunocolmant/?originalSubdomain=be) at the Brussels Book Fair earlier this year, I decided it was time to enhance my creative capabilities with the excellent tools provided by the leading minds in AI.

I started using ChatGPT (you already know ChatGPT, right? Just in case, here's a link: [ChatGPT](https://wikipedia.org/wiki/ChatGPT)) to see how I could boost my current learning. Since the release of the ChatGPT app on Apple devices, it's possible to pair native tools like Reminders with ChatGPT to create a tutor or mentor.

## The Concept

Let's get to the point! Imagine having someone on hand to review your public GitHub repo and offer advice on:

* Project structure and key considerations.
    
* Code quality and adherence to modern standards.
    
* Bug identification.
    
* Improvement suggestions.
    
* Forgotten elements.
    
* Relevant libraries or better-suited concepts.
    
* Etc...
    

And finally, they could log all their recommendations in an issue on your project (wouldn't that be a great friend?) so you can review them later and plan your next steps in development or learning.

Well, that friend doesn't exist! If you have good friends, they might do this for you once, twice, three times, and then... (you get the idea ^^).

Good news! In 2024, you can create a mentor who is always there for you and takes the time to review your code (even when it's in a rough state, like mine during the learning phase).

Enough talking, let's get practical.

> **DISCLAIMER:**
> 
> **Never fully trust an entity (virtual or physical) that has a tendency to hallucinate and tell you nonsense when it doesn't know what to say! You've been warned!**

## Prerequisites

I assume you have at this stage:

* An Apple computer or smartphone.
    
* The ChatGPT app on your Apple device.
    
* A ChatGPT account (paid or free, but be aware of the limitations of the free account).
    
* You develop projects in a public GitHub repo.
    

## Step-by-Step

### GitHub Configuration

Go to [GitHub Tokens](https://github.com/settings/tokens) and create a new token. You can select a classic or fine-grained token (I recommend a fine-grained one that you can customize).

Name it, select an account (yours), and optionally, authorise all repos or just the one where you want to post your issue at the end of the workflow.

The two permissions to select under ***Repository Permissions*** are:


![Permissions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0g1t47qcc5xg8ghm9j2b.png)

![Permissions 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zj6rpwcw33vvq1b7c0e.png)

Generate the token by clicking **Generate Token**. Copy the key and keep it safe. For example, I've created this token: ***github\_pat\_11ABKZ2PI0vDmuiRMHMT7Z\_O3QVIUU4azsc5rddEwZ2i8YKott1vyjw2V44nvrpy5MCQIHVOCH4iATxci6***

💡 **For ChatGPT to access the repo, nothing needs to be done for now. Since the repo is public and you use a version of ChatGPT with internet access, it will have access to all your files.**

### Shortcuts App Configuration

Open the Shortcuts app and create a new shortcut. For this demo, I'll use the desktop version, but know that the smartphone version works the same way.

Here's what the final workflow looks like:

![Shortcut Workflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yx1sblbnu8r48ar4e3vn.png)

You can select various elements on the right side of the app. According to the image above:

1. The first **Text** element contains the public repo URL you want ChatGPT to analyze.
    
2. The second converts the URL into a variable for use in the next block.
    
3. The **Text** block that you pass to ChatGPT. Here’s the text to save you some time (this model is based on the RCT prompt principle - Role/Context/Task). This can be customized for your needs
    

> You are a mentor with extensive experience in JavaScript and full-stack development. You will analyze my public GitHub repository, which serves as my learning playground, and be as thorough as possible in your responses, providing examples and tools:
> 
> **repo (the variable from block 2 ^^)**
> 
> I would like you to help identify the following points:
> 
> * Is the project structure respected? What are the key considerations?
>     
> * Does the code quality meet modern standards?
>     
> * Are there any bugs you can identify?
>     
> * Improvement suggestions?
>     
> * Forgotten elements?
>     
> * Relevant libraries or better-suited concepts?
>     
> 
> Please provide a detailed analysis and concrete suggestions and write the response in English.

4. The block that calls ChatGPT. The options for the block are your choice; I use GPT-4. Be sure to select **Text** corresponding to the previous block. 

![Ask GPT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/djxkhc0jbml12yxra290.png)

5. The next two blocks retrieve ChatGPT's response and store it in a variable **answer** for use in the next block (this is where it gets fun :)).
    
6. Enter the GitHub API pointing to issues [GitHub API Docs](https://docs.github.com/fr/rest/issues/issues?apiVersion=2022-11-28#create-an-issue)
    
    1. Choose **POST** because we want to create an issue automatically.
        
    2. In the headers, create two headers:
        
        1. **Authorization** with the value: **Bearer*github\_pat\_11ABKZ2PI0vDmuiRMHMT7Z\_O3QVIUU4azsc5rddEwZ2i8YKott1vyjw2V44nvrpy5MCQIHVOCH4iATxci6*** (This is the key you saved earlier)
            
        2. **Content-Type** with the value: **application/json**
            
    3. In the **Request Body**, select **JSON** (since the response we send to the API is of type JSON)
        
        1. Add two Keys
            
            1. **title** of type **text** with the value: The title you want, I chose to add the first variable I created **repo**
                
            2. **body** of type **text** with the value: **answer** (ChatGPT's response)

![GitHub API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fuze4jccsp10lluf1ei.png)

Run the workflow, authorize the accesses that Shortcuts will request, and wait for the content to be generated in an issue like the example below (based on my first project).

[GPT Analysis - Contact Application](https://github.com/alamparelli/contact-application/issues/37)

### Conclusion

Now, you have unlimited possibilities. Extract the points you find important from this analysis and guide your learning accordingly.

I hope you can now take full advantage of ChatGPT's advice and continue your learning journey.

Don't hesitate to share your creations that could potentially benefit the community.

See you soon! 👋